
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <link rel="canonical" href="https://blog.csdn.net/qq_35620342/article/details/119947254"/>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta name="renderer" content="webkit"/>
    <meta name="force-rendering" content="webkit"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="report" content='{"pid": "blog", "spm":"1001.2101"}'>
    <meta name="referrer" content="always">
    <meta http-equiv="Cache-Control" content="no-siteapp" /><link rel="alternate" media="handheld" href="#" />
    <meta name="shenma-site-verification" content="5a59773ab8077d4a62bf469ab966a63b_1497598848">
    <meta name="applicable-device" content="pc">
    <link  href="https://g.csdnimg.cn/static/logo/favicon32.ico"  rel="shortcut icon" type="image/x-icon" />
    <title>当年学长把这份Java总结给我，让我普通二本校招拿到22K_java程序鱼的博客-CSDN博客</title>
    <script>
      (function(){ 
        var el = document.createElement("script"); 
        el.src = "https://s3a.pstatp.com/toutiao/push.js?1abfa13dfe74d72d41d83c86d240de427e7cac50c51ead53b2e79d40c7952a23ed7716d05b4a0f683a653eab3e214672511de2457e74e99286eb2c33f4428830"; 
        el.id = "ttzz"; 
        var s = document.getElementsByTagName("script")[0]; 
        s.parentNode.insertBefore(el, s);
      })(window)
    </script>
        <meta name="keywords" content="当年学长把这份Java总结给我，让我普通二本校招拿到22K">
        <meta name="csdn-baidu-search"  content='{"autorun":true,"install":true,"keyword":"当年学长把这份Java总结给我，让我普通二本校招拿到22K"}'>
    <meta name="description" content="当年学长把这份Java总结给我，让我普通二本校招拿到22K">
    <script src="//g.csdnimg.cn/tingyun/1.8.5/blog.js" type='text/javascript'></script>
        <link rel="stylesheet" type="text/css" href="https://csdnimg.cn/release/blogv2/dist/pc/css/detail_enter-049c37bb43.min.css">
    <style>
        #content_views pre{
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            -khtml-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none; 
            user-select: none; 
        }
        #content_views pre code{
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            -khtml-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none; 
            user-select: none; 
        }
    </style>
    <script type="application/ld+json">{"@context":"https://ziyuan.baidu.com/contexts/cambrian.jsonld","@id":"https://blog.csdn.net/qq_35620342/article/details/119947254","appid":"1638831770136827","pubDate":"2021-08-27T10:20:08","title":"当年学长把这份Java总结给我，让我普通二本校招拿到22K_java程序鱼的博客-CSDN博客","upDate":"2021-09-13T09:26:29"}</script>
        <link rel="stylesheet" type="text/css" href="https://csdnimg.cn/release/blogv2/dist/pc/themesSkin/skin-blackboard/skin-blackboard-3adcc2c475.min.css">
    <script src="https://csdnimg.cn/public/common/libs/jquery/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        var isCorporate = false;//注释删除enterprise
        var username =  "qq_35620342";
        var skinImg = "white";
        var blog_address = "https://blog.csdn.net/qq_35620342";
        var currentUserName = "";
        var isOwner = false;
        var loginUrl = "http://passport.csdn.net/account/login?from=https://blog.csdn.net/qq_35620342/article/details/119947254";
        var blogUrl = "https://blog.csdn.net/";
        var avatar = "https://profile.csdnimg.cn/B/0/A/3_qq_35620342";
        var articleTitle = "当年学长把这份Java总结给我，让我普通二本校招拿到22K";
        var articleDesc = "当年学长把这份Java总结给我，让我普通二本校招拿到22K";
        var articleTitles = "当年学长把这份Java总结给我，让我普通二本校招拿到22K_java程序鱼的博客-CSDN博客";
        var nickName = "Java程序鱼";
        var articleDetailUrl = "https://blog.csdn.net/qq_35620342/article/details/119947254";
        if(window.location.host.split('.').length == 3) {
            blog_address = blogUrl + username;
        }
        var skinStatus = "White";
        var blogStaticHost = "https://csdnimg.cn/release/blogv2/"
    </script>
    <script src="https://g.csdnimg.cn/??fixed-sidebar/1.1.6/fixed-sidebar.js" type="text/javascript"></script>
    <script src='//g.csdnimg.cn/common/csdn-report/report.js' type='text/javascript'></script>
    <link rel="stylesheet" type="text/css" href="https://csdnimg.cn/public/sandalstrap/1.4/css/sandalstrap.min.css">
    <style>
        .MathJax, .MathJax_Message, .MathJax_Preview{
            display: none
        }
    </style>
    <script src="https://dup.baidustatic.com/js/ds.js"></script>
</head>
<body class="nodata " style="">
        <script>
            var toolbarSearchExt = '{"landingWord":[],"queryWord":"","tag":["集合","面试"],"title":"当年学长把这份Java总结给我，让我普通二本校招拿到22K"}';
        </script>
    <script src="https://g.csdnimg.cn/common/csdn-toolbar/csdn-toolbar.js" type="text/javascript"></script>
    <script>
    (function(){
        var bp = document.createElement('script');
        var curProtocol = window.location.protocol.split(':')[0];
        if (curProtocol === 'https') {
            bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
        }
        else {
            bp.src = 'http://push.zhanzhang.baidu.com/push.js';
        }
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(bp, s);
    })();
    </script>
<link rel="stylesheet" href="https://csdnimg.cn/release/blogv2/dist/pc/css/blog_code-01256533b5.min.css">
<link rel="stylesheet" href="https://csdnimg.cn/release/blogv2/dist/mdeditor/css/editerView/chart-3456820cac.css" />
<div class="main_father clearfix d-flex justify-content-center" style="height:100%;"> 
    <div class="container clearfix" id="mainBox">
        <main>
<script type="text/javascript">
    function getQueryString(name) {   
      var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象  
      var r = window.location.search.substr(1).match(reg);  //匹配目标参数
      if( r != null ) return decodeURIComponent( r[2] ); return '';   
    }
    function stripscript(s){ 
      var pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~！@#￥……&*（）——|{}【】‘；：”“'。，、？%]") 
      var rs = ""; 
      for (var i = 0; i < s.length; i++) { 
        rs = rs+s.substr(i, 1).replace(pattern, ''); 
      } 
      return rs; 
    }
    var blogHotWords = stripscript(getQueryString('utm_term')).length > 1 ? stripscript(getQueryString('utm_term')) : ''
</script>
<div class="blog-content-box">
        <div class="article-header-box">
        <div class="article-header">
            <div class="article-title-box">
                <h1 class="title-article" id="articleContentId">当年学长把这份Java总结给我，让我普通二本校招拿到22K</h1>
            </div>
            <div class="article-info-box">
                <div class="article-bar-top">
                    <img class="article-type-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/original.png" alt="">
                    <div class="bar-content">
                    <a class="follow-nickName " href="https://blog.csdn.net/qq_35620342" target="_blank" rel="noopener">Java程序鱼</a>
                    <span class="time">2021-09-13 09:26:29</span>
                    <img class="article-read-img article-heard-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/articleReadEyes.png" alt="">
                    <span class="read-count">11711</span>
                    <a id="blog_detail_zk_collection" class="un-collection" data-report-click='{"mod":"popu_823","spm":"1001.2101.3001.4232","ab":"new"}'>
                        <img class="article-collect-img article-heard-img un-collect-status isdefault" style="display:inline-block" src="https://csdnimg.cn/release/blogv2/dist/pc/img/tobarCollect.png" alt="">
                        <img class="article-collect-img article-heard-img collect-status isactive" style="display:none" src="https://csdnimg.cn/release/blogv2/dist/pc/img/tobarCollectionActive.png" alt="">
                        <span class="name">收藏</span>
                        <span class="get-collection">
                            1073
                        </span>
                    </a>
                    </div>
                </div>
                <div class="blog-tags-box">
                    <div class="tags-box artic-tag-box">
                            <span class="label">分类专栏：</span>
                                <a class="tag-link" href="https://blog.csdn.net/qq_35620342/category_11278274.html" target="_blank" rel="noopener">面试题专栏</a>
                            <span class="label">文章标签：</span>
                                <a data-report-click='{"mod":"popu_626","spm":"1001.2101.3001.4223","strategy":"集合","ab":"new"}' class="tag-link" href="https://www.csdn.net/tags/MtTaEg0sNDUzMjgtYmxvZwO0O0OO0O0O.html" target="_blank" rel="noopener">集合</a>
                                <a data-report-click='{"mod":"popu_626","spm":"1001.2101.3001.4223","strategy":"面试","ab":"new"}' class="tag-link" href="https://so.csdn.net/so/search/s.do?q=面试&amp;t=blog&amp;o=vip&amp;s=&amp;l=&amp;f=&amp;viparticle=" target="_blank" rel="noopener">面试</a>
                    </div>
                </div>
                <div class="slide-content-box">
                    <div class="article-copyright">
                        <div class="creativecommons">
                            版权声明：本文为博主原创文章，遵循<a href="http://creativecommons.org/licenses/by-sa/4.0/" target="_blank" rel="noopener"> CC 4.0 BY-SA </a>版权协议，转载请附上原文出处链接和本声明。
                        </div>
                        <div class="article-source-link">
                            本文链接：<a href="https://blog.csdn.net/qq_35620342/article/details/119947254" target="_blank">https://blog.csdn.net/qq_35620342/article/details/119947254</a>
                        </div>
                    </div>
                </div>
                <div class="operating">
                    <a class="href-article-edit slide-toggle">版权</a>
                </div>
            </div>
        </div>
    </div>
        <div id="blogColumnPayAdvert">
            <div class="column-group">
                <div class="column-group-item column-group0 column-group-item-one">
                    <div class="item-l">
                        <a class="item-target" href="https://blog.csdn.net/qq_35620342/category_11278274.html" target="_blank" title="面试题专栏"
                        data-report-view='{"spm":"1001.2101.3001.6332"}'
                        data-report-click='{"spm":"1001.2101.3001.6332"}'>
                            <img class="item-target" src="https://img-blog.csdnimg.cn/20210829110515682.png?x-oss-process=image/resize,m_fixed,h_224,w_224" alt="">
                            <span class="title item-target">面试题专栏</span>
                        </a>
                        <span class="dec">专栏收录该内容</span>
                    </div>
                    <div class="item-m">
                        <span>20 篇文章</span>
                        <span>51 订阅</span>
                    </div>
                    <div class="item-r">
                            <a class="item-target article-column-bt articleColumnFreeBt" data-id="11278274">订阅专栏</a>
                    </div>
                </div>
            </div>
        </div>
    <article class="baidu_pl">
        <div id="article_content" class="article_content clearfix">
        <link rel="stylesheet" href="https://csdnimg.cn/release/blogv2/dist/mdeditor/css/editerView/ck_htmledit_views-1a85854398.css">
                <div id="content_views" class="markdown_views prism-atom-one-light">
                    <svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
                        <path stroke-linecap="round" d="M5,0 0,2.5 5,5z" id="raphael-marker-block" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path>
                    </svg>
                    <blockquote> 
 <p>&#x1f482; 个人主页: <a href="https://blog.csdn.net/qq_35620342">Java程序鱼</a><br /> &#x1f91f; <font color="“#4896fa”"><strong>整个Java 体系的面试题我都会分享&#xff0c;大家可以持续关注</strong></font><br /> &#x1f4ac; 如果文章对你有帮助、<font color="“#4896fa”"><strong>欢迎关注、点赞、收藏(一键三连)和订阅专栏哦</strong></font>。<br /> &#x1f485; 有任何问题欢迎私信,看到会及时回复!</p> 
</blockquote> 
<table><thead><tr><th>序号</th><th>内容</th><th>链接地址</th></tr></thead><tbody><tr><td>1</td><td>Java基础知识面试题</td><td>https://blog.csdn.net/qq_35620342/article/details/119636436</td></tr><tr><td>2</td><td>Java集合容器面试题</td><td>https://blog.csdn.net/qq_35620342/article/details/119947254</td></tr><tr><td>3</td><td>Java并发编程面试题</td><td>https://blog.csdn.net/qq_35620342/article/details/119977224</td></tr><tr><td>4</td><td>Java异常面试题</td><td>https://blog.csdn.net/qq_35620342/article/details/119977051</td></tr><tr><td>5</td><td>JVM面试题</td><td>待分享</td></tr><tr><td>6</td><td>Java Web面试题</td><td>https://blog.csdn.net/qq_35620342/article/details/119642114</td></tr><tr><td>7</td><td>Spring面试题</td><td>https://blog.csdn.net/qq_35620342/article/details/119956512</td></tr><tr><td>8</td><td>Spring MVC面试题</td><td>https://blog.csdn.net/qq_35620342/article/details/119965560</td></tr><tr><td>9</td><td>Spring Boot面试题</td><td>待分享</td></tr><tr><td>10</td><td>MyBatis面试题</td><td>https://blog.csdn.net/qq_35620342/article/details/119956541</td></tr><tr><td>11</td><td>Spring Cloud面试题</td><td>待分享</td></tr><tr><td>12</td><td>Redis面试题</td><td>https://blog.csdn.net/qq_35620342/article/details/119575020</td></tr><tr><td>13</td><td>MySQL数据库面试题</td><td>https://blog.csdn.net/qq_35620342/article/details/119930887</td></tr><tr><td>14</td><td>RabbitMQ面试题</td><td>待分享</td></tr><tr><td>15</td><td>Dubbo面试题</td><td>待分享</td></tr><tr><td>16</td><td>Linux面试题</td><td>待分享</td></tr><tr><td>17</td><td>Tomcat面试题</td><td>待分享</td></tr><tr><td>18</td><td>ZooKeeper面试题</td><td>待分享</td></tr><tr><td>19</td><td>Netty面试题</td><td>待分享</td></tr><tr><td>20</td><td>数据结构与算法面试题</td><td>待分享</td></tr></tbody></table>
<p></p>
<div class="toc">
 <h3>文章目录</h3>
 <ul><li><a href="#_34">前言</a></li><li><a href="#List_43">一、List</a></li><li><ul><li><a href="#1ArrayList_52">1.ArrayList</a></li><li><ul><li><a href="#_107">构造器</a></li><li><a href="#add_151">add()</a></li><li><a href="#addAll_220">addAll()</a></li><li><a href="#get_242">get()</a></li><li><a href="#remove_270">remove()</a></li><li><a href="#_371">快速失败机制</a></li><li><a href="#ArrayList_391">ArrayList如何把元素序列化&#xff1f;</a></li></ul>
   </li><li><a href="#2LinkedList_424">2.LinkedList</a></li><li><ul><li><a href="#_454">双向链表数据结构</a></li><li><a href="#_461">插入元素的原理</a></li><li><a href="#_557">获取元素的原理</a></li><li><a href="#_600">删除元素的原理</a></li></ul>
   </li><li><a href="#3VectorStack_608">3.Vector&amp;Stack</a></li></ul>
  </li><li><a href="#Map_621">二、Map</a></li><li><ul><li><a href="#1HashMap_622">1.HashMap</a></li><li><ul><li><a href="#_623">核心成员变量</a></li><li><a href="#hash_647">优化后的降低冲突概率的hash算法</a></li><li><a href="#put_695">put操作原理</a></li><li><a href="#JDK18_766">JDK1.8红黑树优化</a></li><li><a href="#_773">基于数组扩容原理</a></li><li><a href="#get_807">get()</a></li></ul>
   </li><li><a href="#2LinkedHashMap_841">2.LinkedHashMap</a></li><li><ul><li><a href="#newNode_874">newNode()</a></li><li><a href="#afterNodeInsertion_905">afterNodeInsertion</a></li><li><a href="#afterNodeAccess_922">afterNodeAccess</a></li></ul>
   </li><li><a href="#3TreeMap_937">3.TreeMap</a></li></ul>
  </li><li><a href="#Set_999">三、Set</a></li><li><ul><li><a href="#1HashSet_1000">1.HashSet</a></li><li><a href="#2LinkedHashSet_1006">2.LinkedHashSet</a></li><li><a href="#3TreeSet_1010">3.TreeSet</a></li></ul>
 </li></ul>
</div>
<p></p> 
<hr color="#000000" size="1&#34;" /> 
<h1><a id="_34"></a>前言</h1> 
<p>为什么要学习JDK源码&#xff1f;<br /> 各种各样的系统或者技术&#xff0c;最底层、最最核心的一块&#xff0c;其实都是集合&#xff08;在内存里面存放数据&#xff09;、并发&#xff08;分布式系统&#xff0c;底层都会开多个线程&#xff0c;并发的处理一些东西&#xff0c;这里会涉及到一些锁&#xff0c;同步&#xff0c;等等&#xff09;、IO&#xff08;读写磁盘上的文件里的数据&#xff0c;发起网络IO&#xff0c;通过网络读写数据&#xff09;、网络&#xff08;如何在分布式系统中&#xff0c;各个机器建立网络连接&#xff0c;互相发送请求进行通信&#xff09;&#xff0c;本期先给大家分享集合源码。</p> 
<hr color="#000000" size="1&#34;" /> 
<h1><a id="List_43"></a>一、List</h1> 
<p>List 是有序的 Collection</p> 
<p>List中的元素是有序的、可重复的&#xff0c;主要实现方式有动态数组和链表。</p> 
<p>java中提供的List的实现主要有ArrayList、LinkedList、CopyOnWriteArrayList&#xff0c;另外还有两个古老的类Vector和Stack。</p> 
<p><img src="https://img-blog.csdnimg.cn/2e2a18f784e742de8a0c98e6f1cb80fa.png?x-oss-process&#61;image/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBASmF2Yeeoi-W6j-mxvA&#61;&#61;,size_20,color_FFFFFF,t_70,g_se,x_16#pic_center" alt="在这里插入图片描述" /></p> 
<h2><a id="1ArrayList_52"></a>1.ArrayList</h2> 
<p>ArrayList实现了List, RandomAccess, Cloneable, java.io.Serializable等接口。<br /> ArrayList实现了List&#xff0c;提供了基础的添加、删除、遍历等操作。<br /> ArrayList实现了RandomAccess&#xff0c;提供了随机访问的能力。<br /> ArrayList实现了Cloneable&#xff0c;可以被克隆。<br /> ArrayList实现了Serializable&#xff0c;可以被序列化。<br /> AbstractCollection&#xff1a;主要实现了toString()、toArray()、contains()<br /> AbstractList&#xff1a;主要实现了equals()、hashCode()</p> 
<p>缺点&#xff1a;<br /> ①数组长度固定&#xff0c;java里面数组都是定长数组&#xff0c;比如数组大小设置为100&#xff0c;此时你不停的往ArrayList里面塞入这个数据&#xff0c;此时元素数量超过了100以后&#xff0c;此时就会发生一个数组的扩容&#xff0c;就会搞一个更大的数组&#xff0c;把以前的数组拷贝到新的数组里面去&#xff0c;这个数组扩容&#43;元素拷贝的过程&#xff0c;相对来说会慢一些<br /> ②中间插入慢&#xff0c;数组来实现&#xff0c;数组你要是往数组的中间加一个元素&#xff0c;要把数组中那个新增元素后面的元素全部往后面挪动一位&#xff0c;所以说&#xff0c;如果你是往ArrayList中间插入一个元素&#xff0c;性能比较差&#xff0c;会导致他后面的大量的元素挪动一个位置</p> 
<p>优点&#xff1a;<br /> ①支持随机访问&#xff0c;通过索引访问元素极快&#xff0c;时间复杂度为O(1)</p> 
<p>核心参数&#xff1a;</p> 
<pre><code class="prism language-java"><span class="token comment">/**
* 默认容量
*/</span>
<span class="token keyword">private</span> <span class="token keyword">static</span> <span class="token keyword">final</span> <span class="token keyword">int</span> DEFAULT_CAPACITY <span class="token operator">&#61;</span> <span class="token number">10</span><span class="token punctuation">;</span>

<span class="token comment">/**
* 空数组&#xff0c;如果传入的容量为0时使用

*/</span>
<span class="token keyword">private</span> <span class="token keyword">static</span> <span class="token keyword">final</span> <span class="token class-name">Object</span><span class="token punctuation">[</span><span class="token punctuation">]</span> EMPTY_ELEMENTDATA <span class="token operator">&#61;</span> <span class="token punctuation">{<!-- --></span><span class="token punctuation">}</span><span class="token punctuation">;</span>

<span class="token comment">/**
* 空数组&#xff0c;传传入容量时使用&#xff0c;添加第一个元素的时候会重新初始为默认容量大小
*/</span>
<span class="token keyword">private</span> <span class="token keyword">static</span> <span class="token keyword">final</span> <span class="token class-name">Object</span><span class="token punctuation">[</span><span class="token punctuation">]</span> DEFAULTCAPACITY_EMPTY_ELEMENTDATA <span class="token operator">&#61;</span> <span class="token punctuation">{<!-- --></span><span class="token punctuation">}</span><span class="token punctuation">;</span>

<span class="token comment">/**
* 存储元素的数组
*/</span>
<span class="token keyword">transient</span> <span class="token class-name">Object</span><span class="token punctuation">[</span><span class="token punctuation">]</span> elementData<span class="token punctuation">;</span> <span class="token comment">// non-private to simplify nested class access</span>

<span class="token comment">/**
* 集合中元素的个数
*/</span>
<span class="token keyword">private</span> <span class="token keyword">int</span> size<span class="token punctuation">;</span>
</code></pre> 
<p>&#xff08;1&#xff09;DEFAULT_CAPACITY 默认容量为10&#xff0c;也就是通过new ArrayList()创建时的默认容量。<br /> &#xff08;2&#xff09;EMPTY_ELEMENTDATA 空的数组&#xff0c;这种是通过new ArrayList(0)创建时用的是这个空数组。<br /> &#xff08;3&#xff09;DEFAULTCAPACITY_EMPTY_ELEMENTDATA 也是空数组&#xff0c;这种是通过new ArrayList()创建时用的是这个空数组&#xff0c;与EMPTY_ELEMENTDATA的区别是在添加第一个元素时使用这个空数组的会初始化为DEFAULT_CAPACITY&#xff08;10&#xff09;个元素。<br /> &#xff08;4&#xff09;elementData 真正存放元素的地方&#xff0c;使用transient是为了不序列化这个字段。 至于没有使用private修饰&#xff0c;后面注释是写的“为了简化嵌套类的访问”&#xff0c;但是楼主实测加了private嵌套类一样可以访问。 private表示是类私有的属性&#xff0c;只要是在这个类内部都可以访问&#xff0c;嵌套类或者内部类也是在类的内部&#xff0c;所以也可以访问类的私有成员。<br /> &#xff08;5&#xff09;size 真正存储元素的个数&#xff0c;而不是elementData数组的长度。</p> 
<p>核心方法&#xff1a;</p> 
<h3><a id="_107"></a>构造器</h3> 
<p>&#xff08;1&#xff09;不传初始容量&#xff0c;初始化为DEFAULTCAPACITY_EMPTY_ELEMENTDATA空数组&#xff0c;会在添加第一个元素的时候扩容为默认的大小&#xff0c;即10。</p> 
<pre><code class="prism language-java"><span class="token keyword">public</span> <span class="token class-name">ArrayList</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
      <span class="token comment">// 如果没有传入初始容量&#xff0c;则使用空数组DEFAULTCAPACITY_EMPTY_ELEMENTDATA</span>
      <span class="token comment">// 使用这个数组是在添加第一个元素的时候会扩容到默认大小10</span>
      <span class="token keyword">this</span><span class="token punctuation">.</span>elementData <span class="token operator">&#61;</span> DEFAULTCAPACITY_EMPTY_ELEMENTDATA<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre> 
<p>&#xff08;2&#xff09;ArrayList(int initialCapacity)构造方法&#xff0c;传入初始容量&#xff0c;如果大于0就初始化elementData为对应大小&#xff0c;如果等于0就使用EMPTY_ELEMENTDATA空数组&#xff0c;如果小于0抛出异常</p> 
<pre><code class="prism language-java"><span class="token keyword">public</span> <span class="token class-name">ArrayList</span><span class="token punctuation">(</span><span class="token keyword">int</span> initialCapacity<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
       <span class="token keyword">if</span> <span class="token punctuation">(</span>initialCapacity <span class="token operator">&gt;</span> <span class="token number">0</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
           <span class="token keyword">this</span><span class="token punctuation">.</span>elementData <span class="token operator">&#61;</span> <span class="token keyword">new</span> <span class="token class-name">Object</span><span class="token punctuation">[</span>initialCapacity<span class="token punctuation">]</span><span class="token punctuation">;</span>
       <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token keyword">if</span> <span class="token punctuation">(</span>initialCapacity <span class="token operator">&#61;&#61;</span> <span class="token number">0</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
           <span class="token keyword">this</span><span class="token punctuation">.</span>elementData <span class="token operator">&#61;</span> EMPTY_ELEMENTDATA<span class="token punctuation">;</span>
       <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{<!-- --></span>
           <span class="token keyword">throw</span> <span class="token keyword">new</span> <span class="token class-name">IllegalArgumentException</span><span class="token punctuation">(</span><span class="token string">&#34;Illegal Capacity: &#34;</span><span class="token operator">&#43;</span>
                                               initialCapacity<span class="token punctuation">)</span><span class="token punctuation">;</span>
       <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre> 
<p>DEFAULTCAPACITY_EMPTY_ELEMENTDATA 也是空数组&#xff0c;这种是通过new ArrayList()创建时用的是这个空数组&#xff0c;与EMPTY_ELEMENTDATA的区别是在添加第一个元素时使用这个空数组的会初始化为DEFAULT_CAPACITY&#xff08;10&#xff09;个元素。</p> 
<p>&#xff08;3&#xff09;ArrayList(Collection c)构造方法</p> 
<p>传入集合并初始化elementData&#xff0c;这里会使用拷贝把传入集合的元素拷贝到elementData数组中&#xff0c;如果元素个数为0&#xff0c;则初始化为EMPTY_ELEMENTDATA空数组。</p> 
<pre><code class="prism language-java"><span class="token keyword">public</span> <span class="token class-name">ArrayList</span><span class="token punctuation">(</span><span class="token class-name">Collection</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token operator">?</span> <span class="token keyword">extends</span> <span class="token class-name">E</span><span class="token punctuation">&gt;</span></span> c<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        elementData <span class="token operator">&#61;</span> c<span class="token punctuation">.</span><span class="token function">toArray</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token punctuation">(</span>size <span class="token operator">&#61;</span> elementData<span class="token punctuation">.</span>length<span class="token punctuation">)</span> <span class="token operator">!&#61;</span> <span class="token number">0</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
            <span class="token comment">// c.toArray might (incorrectly) not return Object[] (see 6260652)</span>
            <span class="token keyword">if</span> <span class="token punctuation">(</span>elementData<span class="token punctuation">.</span><span class="token function">getClass</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">!&#61;</span> <span class="token class-name">Object</span><span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">.</span><span class="token keyword">class</span><span class="token punctuation">)</span>
                elementData <span class="token operator">&#61;</span> <span class="token class-name">Arrays</span><span class="token punctuation">.</span><span class="token function">copyOf</span><span class="token punctuation">(</span>elementData<span class="token punctuation">,</span> size<span class="token punctuation">,</span> <span class="token class-name">Object</span><span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">.</span><span class="token keyword">class</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{<!-- --></span>
            <span class="token comment">// replace with empty array.</span>
            <span class="token keyword">this</span><span class="token punctuation">.</span>elementData <span class="token operator">&#61;</span> EMPTY_ELEMENTDATA<span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre> 
<p>根据业务预测初始化的数组的大小&#xff0c;避免数组太小&#xff0c;往里面塞入数据的时候&#xff0c;导致数据不断的扩容&#xff0c;不断的搞新的数组</p> 
<h3><a id="add_151"></a>add()</h3> 
<p>&#xff08;1&#xff09;默认添加</p> 
<p>添加元素到size&#43;1位置&#xff0c;平均时间复杂度为O(1)。</p> 
<pre><code class="prism language-java"><span class="token keyword">public</span> <span class="token keyword">boolean</span> <span class="token function">add</span><span class="token punctuation">(</span><span class="token class-name">E</span> e<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
       <span class="token comment">// 检查是否需要扩容</span>
       <span class="token function">ensureCapacityInternal</span><span class="token punctuation">(</span>size <span class="token operator">&#43;</span> <span class="token number">1</span><span class="token punctuation">)</span><span class="token punctuation">;</span>  <span class="token comment">// Increments modCount!!</span>
       <span class="token comment">// 把元素插入到最后一位</span>
       elementData<span class="token punctuation">[</span>size<span class="token operator">&#43;&#43;</span><span class="token punctuation">]</span> <span class="token operator">&#61;</span> e<span class="token punctuation">;</span>
       <span class="token keyword">return</span> <span class="token boolean">true</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token keyword">private</span> <span class="token keyword">void</span> <span class="token function">ensureCapacityInternal</span><span class="token punctuation">(</span><span class="token keyword">int</span> minCapacity<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        <span class="token function">ensureExplicitCapacity</span><span class="token punctuation">(</span><span class="token function">calculateCapacity</span><span class="token punctuation">(</span>elementData<span class="token punctuation">,</span> minCapacity<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token keyword">private</span> <span class="token keyword">static</span> <span class="token keyword">int</span> <span class="token function">calculateCapacity</span><span class="token punctuation">(</span><span class="token class-name">Object</span><span class="token punctuation">[</span><span class="token punctuation">]</span> elementData<span class="token punctuation">,</span> <span class="token keyword">int</span> minCapacity<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span>elementData <span class="token operator">&#61;&#61;</span> DEFAULTCAPACITY_EMPTY_ELEMENTDATA<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
            <span class="token keyword">return</span> <span class="token class-name">Math</span><span class="token punctuation">.</span><span class="token function">max</span><span class="token punctuation">(</span>DEFAULT_CAPACITY<span class="token punctuation">,</span> minCapacity<span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
        <span class="token keyword">return</span> minCapacity<span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token keyword">private</span> <span class="token keyword">void</span> <span class="token function">ensureExplicitCapacity</span><span class="token punctuation">(</span><span class="token keyword">int</span> minCapacity<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        modCount<span class="token operator">&#43;&#43;</span><span class="token punctuation">;</span>

        <span class="token comment">// 判断是否需要扩容&#xff1a;size &#43; 1 - 当前数组长度 &gt; 0时扩容</span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span>minCapacity <span class="token operator">-</span> elementData<span class="token punctuation">.</span>length <span class="token operator">&gt;</span> <span class="token number">0</span><span class="token punctuation">)</span>
            <span class="token function">grow</span><span class="token punctuation">(</span>minCapacity<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre> 
<p>补充&#xff1a;当前数组长度10&#xff0c;添加第11个元素时才扩容</p> 
<pre><code class="prism language-java"><span class="token keyword">private</span> <span class="token keyword">void</span> <span class="token function">grow</span><span class="token punctuation">(</span><span class="token keyword">int</span> minCapacity<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        <span class="token comment">// overflow-conscious code</span>
        <span class="token keyword">int</span> oldCapacity <span class="token operator">&#61;</span> elementData<span class="token punctuation">.</span>length<span class="token punctuation">;</span>
        <span class="token comment">// 新容量是老容量的1.5倍&#xff08;oldCapacity &#43; (oldCapacity &gt;&gt; 1)&#xff09;</span>
        <span class="token comment">// 老的大小 &#43; 老的大小 &gt;&gt; 1&#xff08;相当于除以2&#xff09;</span>
        <span class="token keyword">int</span> newCapacity <span class="token operator">&#61;</span> oldCapacity <span class="token operator">&#43;</span> <span class="token punctuation">(</span>oldCapacity <span class="token operator">&gt;&gt;</span> <span class="token number">1</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token comment">// 如果加了这么多容量发现比需要的容量还小&#xff0c;则以需要的容量为准</span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span>newCapacity <span class="token operator">-</span> minCapacity <span class="token operator">&lt;</span> <span class="token number">0</span><span class="token punctuation">)</span>
            newCapacity <span class="token operator">&#61;</span> minCapacity<span class="token punctuation">;</span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span>newCapacity <span class="token operator">-</span> MAX_ARRAY_SIZE <span class="token operator">&gt;</span> <span class="token number">0</span><span class="token punctuation">)</span>
            newCapacity <span class="token operator">&#61;</span> <span class="token function">hugeCapacity</span><span class="token punctuation">(</span>minCapacity<span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token comment">// 创建新容量的数组并把老数组拷贝到新数组</span>
        elementData <span class="token operator">&#61;</span> <span class="token class-name">Arrays</span><span class="token punctuation">.</span><span class="token function">copyOf</span><span class="token punctuation">(</span>elementData<span class="token punctuation">,</span> newCapacity<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre> 
<p>补充&#xff1a;空参构造器&#xff0c;第一次初始化时&#xff0c;就需要以需要的容量为准&#xff0c;因为0&#43;(0&gt;&gt;1)&#61;0</p> 
<p>&#xff08;2&#xff09;添加到指定位置</p> 
<pre><code class="prism language-java"><span class="token keyword">public</span> <span class="token keyword">void</span> <span class="token function">add</span><span class="token punctuation">(</span><span class="token keyword">int</span> index<span class="token punctuation">,</span> <span class="token class-name">E</span> element<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        <span class="token function">rangeCheckForAdd</span><span class="token punctuation">(</span>index<span class="token punctuation">)</span><span class="token punctuation">;</span>

        <span class="token function">ensureCapacityInternal</span><span class="token punctuation">(</span>size <span class="token operator">&#43;</span> <span class="token number">1</span><span class="token punctuation">)</span><span class="token punctuation">;</span>  <span class="token comment">// Increments modCount!!</span>
        <span class="token comment">// 把插入索引位置后的元素都往后挪一位</span>
        <span class="token class-name">System</span><span class="token punctuation">.</span><span class="token function">arraycopy</span><span class="token punctuation">(</span>elementData<span class="token punctuation">,</span> index<span class="token punctuation">,</span> elementData<span class="token punctuation">,</span> index <span class="token operator">&#43;</span> <span class="token number">1</span><span class="token punctuation">,</span>
                         size <span class="token operator">-</span> index<span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token comment">// 在插入索引位置放置插入的元素</span>
        elementData<span class="token punctuation">[</span>index<span class="token punctuation">]</span> <span class="token operator">&#61;</span> element<span class="token punctuation">;</span>
        size<span class="token operator">&#43;&#43;</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre> 
<h3><a id="addAll_220"></a>addAll()</h3> 
<pre><code class="prism language-java"><span class="token keyword">public</span> <span class="token keyword">boolean</span> <span class="token function">addAll</span><span class="token punctuation">(</span><span class="token class-name">Collection</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token operator">?</span> <span class="token keyword">extends</span> <span class="token class-name">E</span><span class="token punctuation">&gt;</span></span> c<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>

    <span class="token class-name">Object</span><span class="token punctuation">[</span><span class="token punctuation">]</span> a <span class="token operator">&#61;</span> c<span class="token punctuation">.</span><span class="token function">toArray</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token keyword">int</span> numNew <span class="token operator">&#61;</span> a<span class="token punctuation">.</span>length<span class="token punctuation">;</span>

    <span class="token function">ensureCapacityInternal</span><span class="token punctuation">(</span>size <span class="token operator">&#43;</span> numNew<span class="token punctuation">)</span><span class="token punctuation">;</span>  <span class="token comment">// Increments modCount</span>

    <span class="token class-name">System</span><span class="token punctuation">.</span><span class="token function">arraycopy</span><span class="token punctuation">(</span>a<span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> elementData<span class="token punctuation">,</span> size<span class="token punctuation">,</span> numNew<span class="token punctuation">)</span><span class="token punctuation">;</span>

    size <span class="token operator">&#43;&#61;</span> numNew<span class="token punctuation">;</span>

    <span class="token keyword">return</span> numNew <span class="token operator">!&#61;</span> <span class="token number">0</span><span class="token punctuation">;</span>

<span class="token punctuation">}</span>
</code></pre> 
<p>①将集合C转化为数组a<br /> ②获取数组a长度<br /> ③判断是否需要扩容</p> 
<h3><a id="get_242"></a>get()</h3> 
<p>获取指定索引位置的元素&#xff0c;时间复杂度为O(1)。</p> 
<pre><code class="prism language-java"><span class="token keyword">public</span> <span class="token class-name">E</span> <span class="token function">get</span><span class="token punctuation">(</span><span class="token keyword">int</span> index<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>

    <span class="token function">rangeCheck</span><span class="token punctuation">(</span>index<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token keyword">return</span> <span class="token function">elementData</span><span class="token punctuation">(</span>index<span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token punctuation">}</span>

<span class="token keyword">private</span> <span class="token keyword">void</span> <span class="token function">rangeCheck</span><span class="token punctuation">(</span><span class="token keyword">int</span> index<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>

    <span class="token keyword">if</span> <span class="token punctuation">(</span>index <span class="token operator">&gt;&#61;</span> size<span class="token punctuation">)</span>

        <span class="token keyword">throw</span> <span class="token keyword">new</span> <span class="token class-name">IndexOutOfBoundsException</span><span class="token punctuation">(</span><span class="token function">outOfBoundsMsg</span><span class="token punctuation">(</span>index<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token punctuation">}</span>

<span class="token class-name">E</span> <span class="token function">elementData</span><span class="token punctuation">(</span><span class="token keyword">int</span> index<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>

    <span class="token keyword">return</span> <span class="token punctuation">(</span><span class="token class-name">E</span><span class="token punctuation">)</span> elementData<span class="token punctuation">[</span>index<span class="token punctuation">]</span><span class="token punctuation">;</span>

<span class="token punctuation">}</span>
</code></pre> 
<h3><a id="remove_270"></a>remove()</h3> 
<p>&#xff08;1&#xff09;通过索引删除<br /> 删除指定索引位置的元素&#xff0c;时间复杂度为O(n)。</p> 
<pre><code class="prism language-java"><span class="token keyword">public</span> <span class="token class-name">E</span> <span class="token function">remove</span><span class="token punctuation">(</span><span class="token keyword">int</span> index<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>

    <span class="token function">rangeCheck</span><span class="token punctuation">(</span>index<span class="token punctuation">)</span><span class="token punctuation">;</span>
    modCount<span class="token operator">&#43;&#43;</span><span class="token punctuation">;</span>

    <span class="token class-name">E</span> oldValue <span class="token operator">&#61;</span> <span class="token function">elementData</span><span class="token punctuation">(</span>index<span class="token punctuation">)</span><span class="token punctuation">;</span>

    <span class="token keyword">int</span> numMoved <span class="token operator">&#61;</span> size <span class="token operator">-</span> index <span class="token operator">-</span> <span class="token number">1</span><span class="token punctuation">;</span>

    <span class="token comment">// 如果index不是最后一位&#xff0c;则将index之后的元素往前挪一位</span>
    <span class="token keyword">if</span> <span class="token punctuation">(</span>numMoved <span class="token operator">&gt;</span> <span class="token number">0</span><span class="token punctuation">)</span>

        <span class="token class-name">System</span><span class="token punctuation">.</span><span class="token function">arraycopy</span><span class="token punctuation">(</span>elementData<span class="token punctuation">,</span> index<span class="token operator">&#43;</span><span class="token number">1</span><span class="token punctuation">,</span> elementData<span class="token punctuation">,</span> index<span class="token punctuation">,</span>

                         numMoved<span class="token punctuation">)</span><span class="token punctuation">;</span>

    <span class="token comment">// 将最后一个元素删除&#xff0c;帮助GC</span>
    elementData<span class="token punctuation">[</span><span class="token operator">--</span>size<span class="token punctuation">]</span> <span class="token operator">&#61;</span> <span class="token keyword">null</span><span class="token punctuation">;</span> <span class="token comment">// clear to let GC do its work</span>

    <span class="token keyword">return</span> oldValue<span class="token punctuation">;</span>

<span class="token punctuation">}</span>

<span class="token keyword">private</span> <span class="token keyword">void</span> <span class="token function">rangeCheck</span><span class="token punctuation">(</span><span class="token keyword">int</span> index<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>

    <span class="token keyword">if</span> <span class="token punctuation">(</span>index <span class="token operator">&lt;</span> <span class="token number">0</span> <span class="token operator">||</span> index <span class="token operator">&gt;&#61;</span> <span class="token keyword">this</span><span class="token punctuation">.</span>size<span class="token punctuation">)</span>

        <span class="token keyword">throw</span> <span class="token keyword">new</span> <span class="token class-name">IndexOutOfBoundsException</span><span class="token punctuation">(</span><span class="token function">outOfBoundsMsg</span><span class="token punctuation">(</span>index<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token punctuation">}</span>
</code></pre> 
<p>&#xff08;2&#xff09;通过元素删除</p> 
<p>删除指定元素值的元素&#xff0c;时间复杂度为O(n)。</p> 
<pre><code class="prism language-java"><span class="token keyword">public</span> <span class="token keyword">boolean</span> <span class="token function">remove</span><span class="token punctuation">(</span><span class="token class-name">Object</span> o<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>

    <span class="token keyword">if</span> <span class="token punctuation">(</span>o <span class="token operator">&#61;&#61;</span> <span class="token keyword">null</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>

        <span class="token keyword">for</span> <span class="token punctuation">(</span><span class="token keyword">int</span> index <span class="token operator">&#61;</span> <span class="token number">0</span><span class="token punctuation">;</span> index <span class="token operator">&lt;</span> size<span class="token punctuation">;</span> index<span class="token operator">&#43;&#43;</span><span class="token punctuation">)</span>

            <span class="token keyword">if</span> <span class="token punctuation">(</span>elementData<span class="token punctuation">[</span>index<span class="token punctuation">]</span> <span class="token operator">&#61;&#61;</span> <span class="token keyword">null</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>

                <span class="token function">fastRemove</span><span class="token punctuation">(</span>index<span class="token punctuation">)</span><span class="token punctuation">;</span>
                <span class="token keyword">return</span> <span class="token boolean">true</span><span class="token punctuation">;</span>
            <span class="token punctuation">}</span>

    <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{<!-- --></span>

        <span class="token keyword">for</span> <span class="token punctuation">(</span><span class="token keyword">int</span> index <span class="token operator">&#61;</span> <span class="token number">0</span><span class="token punctuation">;</span> index <span class="token operator">&lt;</span> size<span class="token punctuation">;</span> index<span class="token operator">&#43;&#43;</span><span class="token punctuation">)</span>

            <span class="token keyword">if</span> <span class="token punctuation">(</span>o<span class="token punctuation">.</span><span class="token function">equals</span><span class="token punctuation">(</span>elementData<span class="token punctuation">[</span>index<span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>

                <span class="token function">fastRemove</span><span class="token punctuation">(</span>index<span class="token punctuation">)</span><span class="token punctuation">;</span>
                <span class="token keyword">return</span> <span class="token boolean">true</span><span class="token punctuation">;</span>
            <span class="token punctuation">}</span>

    <span class="token punctuation">}</span>
    <span class="token keyword">return</span> <span class="token boolean">false</span><span class="token punctuation">;</span>

<span class="token punctuation">}</span>

<span class="token keyword">private</span> <span class="token keyword">void</span> <span class="token function">fastRemove</span><span class="token punctuation">(</span><span class="token keyword">int</span> index<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>

    modCount<span class="token operator">&#43;&#43;</span><span class="token punctuation">;</span>

    <span class="token keyword">int</span> numMoved <span class="token operator">&#61;</span> size <span class="token operator">-</span> index <span class="token operator">-</span> <span class="token number">1</span><span class="token punctuation">;</span>

    <span class="token keyword">if</span> <span class="token punctuation">(</span>numMoved <span class="token operator">&gt;</span> <span class="token number">0</span><span class="token punctuation">)</span>

        <span class="token class-name">System</span><span class="token punctuation">.</span><span class="token function">arraycopy</span><span class="token punctuation">(</span>elementData<span class="token punctuation">,</span> index<span class="token operator">&#43;</span><span class="token number">1</span><span class="token punctuation">,</span> elementData<span class="token punctuation">,</span> index<span class="token punctuation">,</span>

                         numMoved<span class="token punctuation">)</span><span class="token punctuation">;</span>

    elementData<span class="token punctuation">[</span><span class="token operator">--</span>size<span class="token punctuation">]</span> <span class="token operator">&#61;</span> <span class="token keyword">null</span><span class="token punctuation">;</span> <span class="token comment">// clear to let GC do its work</span>

<span class="token punctuation">}</span>
</code></pre> 
<p>①找到第一个等于指定元素值的元素&#xff1b;<br /> ②快速删除&#xff1b;</p> 
<p>fastRemove(int index)相对于remove(int index)少了检查索引越界的操作&#xff0c;可见jdk将性能优化到极致。</p> 
<p>6.迭代器</p> 
<pre><code class="prism language-java"><span class="token keyword">private</span> <span class="token keyword">class</span> <span class="token class-name">Itr</span> <span class="token keyword">implements</span> <span class="token class-name">Iterator</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">E</span><span class="token punctuation">&gt;</span></span> <span class="token punctuation">{<!-- --></span>

    <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
<span class="token punctuation">}</span>
<span class="token keyword">private</span> <span class="token keyword">class</span> <span class="token class-name">ListItr</span> <span class="token keyword">extends</span> <span class="token class-name">Itr</span> <span class="token keyword">implements</span> <span class="token class-name">ListIterator</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">E</span><span class="token punctuation">&gt;</span></span> <span class="token punctuation">{<!-- --></span>

    <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
<span class="token punctuation">}</span>
</code></pre> 
<p>ListItr继承了Itr和ListIterator&#xff0c;ListIterator有插入和修改删除方法&#xff0c;同时还具有向前遍历的方法&#xff0c;所以ListIterator就具备了增删改查的功能&#xff0c;比Itr的功能更加齐全</p> 
<h3><a id="_371"></a>快速失败机制</h3> 
<p>假设存在两个线程&#xff08;线程1、线程2&#xff09;&#xff0c;线程1通过Iterator在遍历集合A中的元素&#xff0c;在某个时候线程2修改了集合A的结构&#xff08;是结构上面的修改&#xff0c;而不是简单的修改集合元素的内容&#xff09;&#xff0c;那么这个时候程序就会抛出 ConcurrentModificationException 异常&#xff0c;从而产生fail-fast。<br /> <img src="https://img-blog.csdnimg.cn/884a9a2fb6d242f3b7d13e1e592ac773.png?x-oss-process&#61;image/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBASmF2Yeeoi-W6j-mxvA&#61;&#61;,size_18,color_FFFFFF,t_70,g_se,x_16#pic_center" alt="在这里插入图片描述" /></p> 
<p>检查modCount标识符</p> 
<pre><code class="prism language-java"><span class="token keyword">final</span> <span class="token keyword">void</span> <span class="token function">checkForComodification</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>

    <span class="token keyword">if</span> <span class="token punctuation">(</span>modCount <span class="token operator">!&#61;</span> expectedModCount<span class="token punctuation">)</span>

        <span class="token keyword">throw</span> <span class="token keyword">new</span> <span class="token class-name">ConcurrentModificationException</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token punctuation">}</span>
</code></pre> 
<p>无论是add()、remove()&#xff0c;还是clear()&#xff0c;只要涉及到修改集合中的元素个数时&#xff0c;都会改变modCount的值&#xff08;都是modCount&#43;1&#xff09;。</p> 
<p>ArrayList的Iterator实现类中调用next()时&#xff0c;会“调用checkForComodification()比较‘expectedModCount’和‘modCount’的大小”&#xff1b;但是&#xff0c;CopyOnWriteArrayList的Iterator实现类中&#xff0c;没有所谓的checkForComodification()&#xff0c;更不会抛出ConcurrentModificationException异常&#xff01;</p> 
<h3><a id="ArrayList_391"></a>ArrayList如何把元素序列化&#xff1f;</h3> 
<p>elementData设置成了transient&#xff0c;那ArrayList是怎么把元素序列化的呢&#xff1f;</p> 
<p>一般地&#xff0c;只要实现了Serializable接口即可自动序列化&#xff0c;writeObject()和readObject()是为了自己控制序列化的方式&#xff0c;这两个方法必须声明为private&#xff0c;在java.io.ObjectStreamClass#getPrivateMethod()方法中通过反射获取到writeObject()这个方法。&#xff08;用户自定义的 writeObject 和 readObject 方法可以允许用户控制序列化的过程&#xff09;</p> 
<p>Serializable&#xff1a;一个对象序列化的接口&#xff0c;一个类只有实现了Serializable接口&#xff0c;它的对象才是可序列化的。<br /> Serializeble的作用仅仅是一个标识这个类是可序列化的</p> 
<p>什么情况下需要序列化&#xff1f;&#xff08;应用场景&#xff09;<br /> ①将内存对象保存到磁盘中或数据库中&#xff08;持久化&#xff09;。<br /> ②最常见的用法&#xff0c;web客服端连接服务器的时候&#xff0c;假如连接的客服端比较多&#xff0c;这时服务端压力比较大&#xff08;内存不足&#xff09;&#xff0c;为了解决这些问题&#xff0c;把一些Session序列化&#xff0c;存入硬盘用的时候拿出来。<br /> ③在跨平台环境下&#xff0c;通过网络传输对象的时候需要序列化&#xff0c;例如WebService SOAP</p> 
<p>transient&#xff1a;表示方法和属性等成员变量是透明的&#xff0c;不参与序列化。<br /> static&#xff1a;静态变量不能序列化</p> 
<p>什么是序列化和反序列化&#xff1f;<br /> 序列化机制&#xff1a;将内存Java 对象通过字节输出流写入硬盘&#xff08;大部分是乱码&#xff0c;因为是二进制&#xff09;。<br /> 反序列化机制&#xff1a;通过字节输入流从硬盘中文件中把对象读到内存中。&#xff08;字节序列转换成Java对象&#xff09;<br /> 为什么要有序列号&#xff1f;</p> 
<p>如果没有给序列号&#xff0c;会根据属性和方法算出序列号&#xff0c;若属性和方法改变会报错&#xff0c;因为序列号不同&#xff0c;若加了序列号&#xff0c;可以添删属性&#xff0c;改变toString都不会报错<br /> elementData定义为transient的优势&#xff0c;自己根据size序列化真实的元素&#xff0c;而不是根据数组的长度序列化元素&#xff0c;减少了空间占用。</p> 
<p>总结&#xff1a;<br /> &#xff08;1&#xff09;ArrayList内部使用数组存储元素&#xff0c;当数组长度不够时进行扩容&#xff0c;每次加一半的空间&#xff0c;ArrayList不会进行缩容&#xff1b;<br /> &#xff08;2&#xff09;ArrayList支持随机访问&#xff0c;通过索引访问元素极快&#xff0c;时间复杂度为O(1)&#xff1b;<br /> &#xff08;3&#xff09;ArrayList添加元素到尾部极快&#xff0c;平均时间复杂度为O(1)&#xff1b;<br /> &#xff08;4&#xff09;ArrayList添加元素到中间比较慢&#xff0c;因为要搬移元素&#xff0c;平均时间复杂度为O(n)&#xff1b;<br /> &#xff08;5&#xff09;ArrayList从尾部删除元素极快&#xff0c;时间复杂度为O(1)&#xff1b;<br /> &#xff08;6&#xff09;ArrayList从中间删除元素比较慢&#xff0c;因为要搬移元素&#xff0c;平均时间复杂度为O(n)&#xff1b;</p> 
<h2><a id="2LinkedList_424"></a>2.LinkedList</h2> 
<p>LinkedList是一个以双向链表实现的List&#xff0c;它除了作为List使用&#xff0c;还可以作为队列或者栈来使用<br /> <img src="https://img-blog.csdnimg.cn/9642f2b22cf042b2a8e550cba5abd6d0.png?x-oss-process&#61;image/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBASmF2Yeeoi-W6j-mxvA&#61;&#61;,size_20,color_FFFFFF,t_70,g_se,x_16#pic_center" alt="在这里插入图片描述" /><br /> ArrayList&#43;Deque</p> 
<p>因为ArrayList代表了List的典型实现&#xff0c;LInkedList代表了Deque的典型实现&#xff0c;同时LinkedList也实现了List&#xff0c;通过这两个类一首一尾正好可以把整个集合贯穿起来。</p> 
<p>优点&#xff1a;<br /> ①插入性能高&#xff0c;不管是从末尾插入还是中间插入</p> 
<p>缺点&#xff1a;<br /> 随机读性能差&#xff0c;例如LinkedList.get(10)&#xff0c;这种操作&#xff0c;性能就很低&#xff0c;因为他需要遍历这个链表&#xff0c;从头开始遍历这个链表&#xff0c;直到找到index &#61; 10的这个元素为止</p> 
<p>使用场景</p> 
<p>&#xff08;1&#xff09;ArrayList&#xff1a;一般场景&#xff0c;都是用ArrayList来代表一个集合&#xff0c;只要别频繁的往里面插入和灌入大量的元素就可以了&#xff0c;遍历&#xff0c;或者随机查&#xff0c;都可以</p> 
<p>&#xff08;2&#xff09;LinkedList&#xff1a;适合&#xff0c;频繁的在list中插入和删除某个元素&#xff0c;然后尤其是LinkedList他其实是可以当做队列来用的&#xff0c;这个东西的话呢&#xff0c;我们后面看源码的时候&#xff0c;可以来看一下&#xff0c;先进先出&#xff0c;在list尾部怼进去一个元素&#xff0c;从头部拿出来一个元素。如果要在内存里实现一个基本的队列的话&#xff0c;可以用LinkedList</p> 
<p>我们之前在电商系统开发的时候&#xff0c;在第一个版本中&#xff0c;用到了内存队列&#xff0c;用的就是LinkedList&#xff0c;他里面基于链表实现&#xff0c;天然就可以做队列的数据结构&#xff0c;先进先出&#xff0c;链表来实现&#xff0c;特别适合频繁的在里面插入元素什么的&#xff0c;也不会导致数组扩容</p> 
<p>其实在工作中使用的时候&#xff0c;都是用的是java并发包下面的一些线程安全的集合&#xff0c;这个东西等到讲java并发包的时候&#xff0c;我们可以再来看一下</p> 
<p>LinkedList作为队列使用<br /> offer()&#xff0c;就是在队列尾部入队&#xff0c;将一个元素插入队列尾部<br /> poll()&#xff0c;从队列头部出队<br /> peek()&#xff0c;获取队列头部的元素&#xff0c;但是头部的元素不出队<br /> offerFirst()<br /> offerLast()</p> 
<h3><a id="_454"></a>双向链表数据结构</h3> 
<p>item是元素<br /> prev、next是指针<br /> <img src="https://img-blog.csdnimg.cn/c8f7c6e8d2f949cdb724297e1a268d93.png?x-oss-process&#61;image/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBASmF2Yeeoi-W6j-mxvA&#61;&#61;,size_20,color_FFFFFF,t_70,g_se,x_16#pic_center" alt="在这里插入图片描述" /></p> 
<h3><a id="_461"></a>插入元素的原理</h3> 
<p>&#xff08;1&#xff09;尾部插入</p> 
<p>add()&#xff0c;默认就是在队列的尾部插入一个元素&#xff0c;在那个双向链表的尾部插入一个元素<br /> addLast()&#xff0c;跟add()方法是一样的&#xff0c;也是在尾部插入一个元素</p> 
<p><img src="https://img-blog.csdnimg.cn/95f669cdba714136bef37f1ce1ff5e0e.png?x-oss-process&#61;image/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBASmF2Yeeoi-W6j-mxvA&#61;&#61;,size_20,color_FFFFFF,t_70,g_se,x_16#pic_center" alt="在这里插入图片描述" /></p> 
<pre><code class="prism language-java"><span class="token keyword">public</span> <span class="token keyword">boolean</span> <span class="token function">add</span><span class="token punctuation">(</span><span class="token class-name">E</span> e<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
     <span class="token function">linkLast</span><span class="token punctuation">(</span>e<span class="token punctuation">)</span><span class="token punctuation">;</span>
     <span class="token keyword">return</span> <span class="token boolean">true</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token keyword">void</span> <span class="token function">linkLast</span><span class="token punctuation">(</span><span class="token class-name">E</span> e<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        <span class="token keyword">final</span> <span class="token class-name">Node</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">E</span><span class="token punctuation">&gt;</span></span> l <span class="token operator">&#61;</span> last<span class="token punctuation">;</span>
        <span class="token keyword">final</span> <span class="token class-name">Node</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">E</span><span class="token punctuation">&gt;</span></span> newNode <span class="token operator">&#61;</span> <span class="token keyword">new</span> <span class="token class-name">Node</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token punctuation">&gt;</span></span><span class="token punctuation">(</span>l<span class="token punctuation">,</span> e<span class="token punctuation">,</span> <span class="token keyword">null</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        last <span class="token operator">&#61;</span> newNode<span class="token punctuation">;</span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span>l <span class="token operator">&#61;&#61;</span> <span class="token keyword">null</span><span class="token punctuation">)</span>
            first <span class="token operator">&#61;</span> newNode<span class="token punctuation">;</span>
        <span class="token keyword">else</span>
            l<span class="token punctuation">.</span>next <span class="token operator">&#61;</span> newNode<span class="token punctuation">;</span>
        size<span class="token operator">&#43;&#43;</span><span class="token punctuation">;</span>
        modCount<span class="token operator">&#43;&#43;</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre> 
<p>&#xff08;2&#xff09;队列中间插入</p> 
<p>add(index, element)&#xff0c;是在队列的中间插入一个元素</p> 
<p><img src="https://img-blog.csdnimg.cn/4013336550af4588a5be2789d45f5cee.png?x-oss-process&#61;image/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBASmF2Yeeoi-W6j-mxvA&#61;&#61;,size_20,color_FFFFFF,t_70,g_se,x_16#pic_center" alt="在这里插入图片描述" /></p> 
<pre><code class="prism language-java"><span class="token keyword">public</span> <span class="token keyword">void</span> <span class="token function">add</span><span class="token punctuation">(</span><span class="token keyword">int</span> index<span class="token punctuation">,</span> <span class="token class-name">E</span> element<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        <span class="token function">checkPositionIndex</span><span class="token punctuation">(</span>index<span class="token punctuation">)</span><span class="token punctuation">;</span>

        <span class="token keyword">if</span> <span class="token punctuation">(</span>index <span class="token operator">&#61;&#61;</span> size<span class="token punctuation">)</span>
            <span class="token function">linkLast</span><span class="token punctuation">(</span>element<span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token keyword">else</span>
            <span class="token function">linkBefore</span><span class="token punctuation">(</span>element<span class="token punctuation">,</span> <span class="token function">node</span><span class="token punctuation">(</span>index<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token keyword">void</span> <span class="token function">linkBefore</span><span class="token punctuation">(</span><span class="token class-name">E</span> e<span class="token punctuation">,</span> <span class="token class-name">Node</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">E</span><span class="token punctuation">&gt;</span></span> succ<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        <span class="token comment">// assert succ !&#61; null;</span>
        <span class="token keyword">final</span> <span class="token class-name">Node</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">E</span><span class="token punctuation">&gt;</span></span> pred <span class="token operator">&#61;</span> succ<span class="token punctuation">.</span>prev<span class="token punctuation">;</span>
        <span class="token keyword">final</span> <span class="token class-name">Node</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">E</span><span class="token punctuation">&gt;</span></span> newNode <span class="token operator">&#61;</span> <span class="token keyword">new</span> <span class="token class-name">Node</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token punctuation">&gt;</span></span><span class="token punctuation">(</span>pred<span class="token punctuation">,</span> e<span class="token punctuation">,</span> succ<span class="token punctuation">)</span><span class="token punctuation">;</span>
        succ<span class="token punctuation">.</span>prev <span class="token operator">&#61;</span> newNode<span class="token punctuation">;</span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span>pred <span class="token operator">&#61;&#61;</span> <span class="token keyword">null</span><span class="token punctuation">)</span>
            first <span class="token operator">&#61;</span> newNode<span class="token punctuation">;</span>
        <span class="token keyword">else</span>
            pred<span class="token punctuation">.</span>next <span class="token operator">&#61;</span> newNode<span class="token punctuation">;</span>
        size<span class="token operator">&#43;&#43;</span><span class="token punctuation">;</span>
        modCount<span class="token operator">&#43;&#43;</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token class-name">Node</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">E</span><span class="token punctuation">&gt;</span></span> <span class="token function">node</span><span class="token punctuation">(</span><span class="token keyword">int</span> index<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        <span class="token comment">// assert isElementIndex(index);</span>

        <span class="token keyword">if</span> <span class="token punctuation">(</span>index <span class="token operator">&lt;</span> <span class="token punctuation">(</span>size <span class="token operator">&gt;&gt;</span> <span class="token number">1</span><span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
            <span class="token class-name">Node</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">E</span><span class="token punctuation">&gt;</span></span> x <span class="token operator">&#61;</span> first<span class="token punctuation">;</span>
            <span class="token keyword">for</span> <span class="token punctuation">(</span><span class="token keyword">int</span> i <span class="token operator">&#61;</span> <span class="token number">0</span><span class="token punctuation">;</span> i <span class="token operator">&lt;</span> index<span class="token punctuation">;</span> i<span class="token operator">&#43;&#43;</span><span class="token punctuation">)</span>
                x <span class="token operator">&#61;</span> x<span class="token punctuation">.</span>next<span class="token punctuation">;</span>
            <span class="token keyword">return</span> x<span class="token punctuation">;</span>
        <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{<!-- --></span>
            <span class="token class-name">Node</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">E</span><span class="token punctuation">&gt;</span></span> x <span class="token operator">&#61;</span> last<span class="token punctuation">;</span>
            <span class="token keyword">for</span> <span class="token punctuation">(</span><span class="token keyword">int</span> i <span class="token operator">&#61;</span> size <span class="token operator">-</span> <span class="token number">1</span><span class="token punctuation">;</span> i <span class="token operator">&gt;</span> index<span class="token punctuation">;</span> i<span class="token operator">--</span><span class="token punctuation">)</span>
                x <span class="token operator">&#61;</span> x<span class="token punctuation">.</span>prev<span class="token punctuation">;</span>
            <span class="token keyword">return</span> x<span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre> 
<p>&#xff08;3&#xff09;头部插入</p> 
<p><img src="https://img-blog.csdnimg.cn/7c34610b22f14768a1392c74a313f4a7.png?x-oss-process&#61;image/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBASmF2Yeeoi-W6j-mxvA&#61;&#61;,size_20,color_FFFFFF,t_70,g_se,x_16#pic_center" alt="在这里插入图片描述" /></p> 
<p>addFirst()&#xff0c;在队列的头部插入一个元素</p> 
<pre><code class="prism language-java"><span class="token keyword">public</span> <span class="token keyword">void</span> <span class="token function">addFirst</span><span class="token punctuation">(</span><span class="token class-name">E</span> e<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
     <span class="token function">linkFirst</span><span class="token punctuation">(</span>e<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token keyword">private</span> <span class="token keyword">void</span> <span class="token function">linkFirst</span><span class="token punctuation">(</span><span class="token class-name">E</span> e<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        <span class="token keyword">final</span> <span class="token class-name">Node</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">E</span><span class="token punctuation">&gt;</span></span> f <span class="token operator">&#61;</span> first<span class="token punctuation">;</span>
        <span class="token keyword">final</span> <span class="token class-name">Node</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">E</span><span class="token punctuation">&gt;</span></span> newNode <span class="token operator">&#61;</span> <span class="token keyword">new</span> <span class="token class-name">Node</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token punctuation">&gt;</span></span><span class="token punctuation">(</span><span class="token keyword">null</span><span class="token punctuation">,</span> e<span class="token punctuation">,</span> f<span class="token punctuation">)</span><span class="token punctuation">;</span>
        first <span class="token operator">&#61;</span> newNode<span class="token punctuation">;</span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span>f <span class="token operator">&#61;&#61;</span> <span class="token keyword">null</span><span class="token punctuation">)</span>
            last <span class="token operator">&#61;</span> newNode<span class="token punctuation">;</span>
        <span class="token keyword">else</span>
            f<span class="token punctuation">.</span>prev <span class="token operator">&#61;</span> newNode<span class="token punctuation">;</span>
        size<span class="token operator">&#43;&#43;</span><span class="token punctuation">;</span>
        modCount<span class="token operator">&#43;&#43;</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre> 
<h3><a id="_557"></a>获取元素的原理</h3> 
<p>&#xff08;1&#xff09;获取头部元素</p> 
<p>getFirst() 获取头部的元素&#xff0c;他其实就是直接返回first指针指向的那个Node他里面的数据&#xff0c;他们都是返回头部的元素。getFirst()如果是对空list调用&#xff0c;会抛异常&#xff1b;peek()对空list调用&#xff0c;会返回null</p> 
<p>&#xff08;2&#xff09;获取尾部元素</p> 
<p>getLast()&#xff1a;获取尾部的元素&#xff0c;他其实就是直接返回last指针指向的那个Node他里面的数据</p> 
<pre><code class="prism language-java"><span class="token keyword">public</span> <span class="token class-name">E</span> <span class="token function">getLast</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        <span class="token keyword">final</span> <span class="token class-name">Node</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">E</span><span class="token punctuation">&gt;</span></span> l <span class="token operator">&#61;</span> last<span class="token punctuation">;</span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span>l <span class="token operator">&#61;&#61;</span> <span class="token keyword">null</span><span class="token punctuation">)</span>
            <span class="token keyword">throw</span> <span class="token keyword">new</span> <span class="token class-name">NoSuchElementException</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token keyword">return</span> l<span class="token punctuation">.</span>item<span class="token punctuation">;</span>
 <span class="token punctuation">}</span>
</code></pre> 
<p>&#xff08;3&#xff09;获取中间的元素</p> 
<pre><code class="prism language-java"><span class="token keyword">public</span> <span class="token class-name">E</span> <span class="token function">get</span><span class="token punctuation">(</span><span class="token keyword">int</span> index<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        <span class="token function">checkElementIndex</span><span class="token punctuation">(</span>index<span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token keyword">return</span> <span class="token function">node</span><span class="token punctuation">(</span>index<span class="token punctuation">)</span><span class="token punctuation">.</span>item<span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token class-name">Node</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">E</span><span class="token punctuation">&gt;</span></span> <span class="token function">node</span><span class="token punctuation">(</span><span class="token keyword">int</span> index<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        <span class="token comment">// assert isElementIndex(index);</span>

        <span class="token keyword">if</span> <span class="token punctuation">(</span>index <span class="token operator">&lt;</span> <span class="token punctuation">(</span>size <span class="token operator">&gt;&gt;</span> <span class="token number">1</span><span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
            <span class="token class-name">Node</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">E</span><span class="token punctuation">&gt;</span></span> x <span class="token operator">&#61;</span> first<span class="token punctuation">;</span>
            <span class="token keyword">for</span> <span class="token punctuation">(</span><span class="token keyword">int</span> i <span class="token operator">&#61;</span> <span class="token number">0</span><span class="token punctuation">;</span> i <span class="token operator">&lt;</span> index<span class="token punctuation">;</span> i<span class="token operator">&#43;&#43;</span><span class="token punctuation">)</span>
                x <span class="token operator">&#61;</span> x<span class="token punctuation">.</span>next<span class="token punctuation">;</span>
            <span class="token keyword">return</span> x<span class="token punctuation">;</span>
        <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{<!-- --></span>
            <span class="token class-name">Node</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">E</span><span class="token punctuation">&gt;</span></span> x <span class="token operator">&#61;</span> last<span class="token punctuation">;</span>
            <span class="token keyword">for</span> <span class="token punctuation">(</span><span class="token keyword">int</span> i <span class="token operator">&#61;</span> size <span class="token operator">-</span> <span class="token number">1</span><span class="token punctuation">;</span> i <span class="token operator">&gt;</span> index<span class="token punctuation">;</span> i<span class="token operator">--</span><span class="token punctuation">)</span>
                x <span class="token operator">&#61;</span> x<span class="token punctuation">.</span>prev<span class="token punctuation">;</span>
            <span class="token keyword">return</span> x<span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre> 
<p>LinkedList而言&#xff0c;get(int index)这个方法&#xff0c;是他的弱项&#xff0c;也是他的缺点&#xff0c;如果他要获取某个随机位置的元素&#xff0c;需要使用node(index)这个方法&#xff0c;是要进行链表的遍历&#xff0c;会判断一下index和size &gt;&gt; 1进行比较&#xff0c;如果在前半部分&#xff0c;就会从头部开始遍历&#xff1b;如果在后半部分&#xff0c;就会从尾部开始遍历</p> 
<h3><a id="_600"></a>删除元素的原理</h3> 
<p>&#xff08;1&#xff09;删除尾部</p> 
<p>&#xff08;2&#xff09;删除头部</p> 
<p>&#xff08;3&#xff09;删除中间的元素</p> 
<h2><a id="3VectorStack_608"></a>3.Vector&amp;Stack</h2> 
<p>栈由Vector和Stack两个来实现&#xff0c;Stack代表了一个栈这种数据结构&#xff0c;他是继承自Vector来实现的&#xff0c;Vector是一种类似于ArrayList&#xff08;基于数组来实现的&#xff09;数据结构&#xff0c;有序的集合&#xff0c;Stack是一种基于数组来实现的栈数据结构</p> 
<p>栈&#xff0c;先进后出&#xff0c;跟队列的先进先出是不一样</p> 
<p>队列&#xff1a;一般是队尾巴进去开始排队&#xff0c;从队头开始出来&#xff0c;排队的过程&#xff0c;先进先出<br /> 栈&#xff1a;进去的时候直接压入栈底&#xff0c;出来的时候是从栈的最上面一个元素开始先出来&#xff0c;先进后出</p> 
<p>ArrayList每次扩容是1.5倍&#xff0c;capacity &#43; (capacity &gt;&gt; 1) &#61; 1.5<br /> Vector每次扩容默认是2倍&#xff0c;默认情况下是直接扩容两倍&#xff0c;2倍</p> 
<hr color="#000000" size="1&#34;" /> 
<h1><a id="Map_621"></a>二、Map</h1> 
<h2><a id="1HashMap_622"></a>1.HashMap</h2> 
<h3><a id="_623"></a>核心成员变量</h3> 
<pre><code class="prism language-java"><span class="token comment">// 数组默认的初始大小,16</span>
<span class="token keyword">static</span> <span class="token keyword">final</span> <span class="token keyword">int</span> DEFAULT_INITIAL_CAPACITY <span class="token operator">&#61;</span> <span class="token number">1</span> <span class="token operator">&lt;&lt;</span> <span class="token number">4</span><span class="token punctuation">;</span> <span class="token comment">// aka 16</span>
<span class="token comment">// 负载因子&#xff0c;如果你在数组里的元素的个数达到了数组大小 * 负载因子&#xff0c;就会进行数组的扩容</span>
<span class="token keyword">static</span> <span class="token keyword">final</span> <span class="token keyword">float</span> DEFAULT_LOAD_FACTOR <span class="token operator">&#61;</span> <span class="token number">0.75f</span><span class="token punctuation">;</span>
<span class="token comment">// 这个数组就是所谓的map里的核心数据结构的数组&#xff0c;数组的元素就可以看到是Node类型的&#xff0c;天然就可以挂成一个链表&#xff0c;单向链表&#xff0c;Node里面只有一个next指针</span>
<span class="token keyword">transient</span> <span class="token class-name">Node</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">K</span><span class="token punctuation">,</span><span class="token class-name">V</span><span class="token punctuation">&gt;</span></span><span class="token punctuation">[</span><span class="token punctuation">]</span> table<span class="token punctuation">;</span>
<span class="token comment">// 这个size代表的是就是当前hashmap中有多少个key-value对&#xff0c;如果这个数量达到了指定大小 * 负载因子&#xff0c;那么就会进行数组的扩容</span>
<span class="token keyword">transient</span> <span class="token keyword">int</span> size<span class="token punctuation">;</span>
</code></pre> 
<pre><code class="prism language-java"><span class="token keyword">static</span> <span class="token keyword">class</span> <span class="token class-name">Node</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">K</span><span class="token punctuation">,</span><span class="token class-name">V</span><span class="token punctuation">&gt;</span></span> <span class="token keyword">implements</span> <span class="token class-name">Map<span class="token punctuation">.</span>Entry</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">K</span><span class="token punctuation">,</span><span class="token class-name">V</span><span class="token punctuation">&gt;</span></span> <span class="token punctuation">{<!-- --></span>
        <span class="token keyword">final</span> <span class="token keyword">int</span> hash<span class="token punctuation">;</span>
        <span class="token keyword">final</span> <span class="token class-name">K</span> key<span class="token punctuation">;</span>
        <span class="token class-name">V</span> value<span class="token punctuation">;</span>
        <span class="token class-name">Node</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">K</span><span class="token punctuation">,</span><span class="token class-name">V</span><span class="token punctuation">&gt;</span></span> next<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre> 
<p>这是一个很关键的内部类&#xff0c;他其实是代表了一个key-value对&#xff0c;里面包含了key的hash值&#xff0c;key&#xff0c;value&#xff0c;还有就是可以有一个next的指针&#xff0c;指向下一个Node&#xff0c;也就是指向单向链表中的下一个节点</p> 
<p>通过这个next指针&#xff0c;就可以形成一个链表</p> 
<h3><a id="hash_647"></a>优化后的降低冲突概率的hash算法</h3> 
<p>基础补充&#xff1a;<br /> 左移运算符&#xff08;&lt;&lt;&#xff09;<br /> 定义&#xff1a;将一个运算对象的各二进制位全部左移若干位&#xff08;左边的二进制位丢弃&#xff0c;右边补0&#xff09;。<br /> 设 a&#61;1010 1110&#xff0c;a &#61; a&lt;&lt; 2 将a的二进制位左移2位、右补0&#xff0c;即得a&#61;1011 1000。<br /> 若左移时舍弃的高位不包含1&#xff0c;则每左移一位&#xff0c;相当于该数乘以2。</p> 
<p>右移运算符&#xff08;&gt;&gt;&#xff09;<br /> 定义&#xff1a;将一个数的各二进制位全部右移若干位&#xff0c;正数左补0&#xff0c;负数左补1&#xff0c;右边丢弃。<br /> 例如&#xff1a;a&#61;a&gt;&gt;2 将a的二进制位右移2位&#xff0c;左补0 或者 左补1得看被移数是正还是负。<br /> 操作数每右移一位&#xff0c;相当于该数除以2。</p> 
<p>异或&#xff1a;两个位相同为0&#xff0c;相异为1</p> 
<p>map.put(key, value) -&gt; 对key进行hash算法&#xff0c;通过hash获取到对应的数组中的index位置</p> 
<pre><code class="prism language-java"><span class="token keyword">static</span> <span class="token keyword">final</span> <span class="token keyword">int</span> <span class="token function">hash</span><span class="token punctuation">(</span><span class="token class-name">Object</span> key<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        <span class="token keyword">int</span> h<span class="token punctuation">;</span>
        <span class="token keyword">return</span> <span class="token punctuation">(</span>key <span class="token operator">&#61;&#61;</span> <span class="token keyword">null</span><span class="token punctuation">)</span> <span class="token operator">?</span> <span class="token number">0</span> <span class="token operator">:</span> <span class="token punctuation">(</span>h <span class="token operator">&#61;</span> key<span class="token punctuation">.</span><span class="token function">hashCode</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token operator">^</span> <span class="token punctuation">(</span>h <span class="token operator">&gt;&gt;&gt;</span> <span class="token number">16</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre> 
<p>第一步&#xff1a;计算出key的哈希值</p> 
<p>第二步&#xff1a;把hash值右移16位<br /> 假设原hashcode值是&#xff1a;1111 1111 1111 1111 1111 1010 0111 1100<br /> h &gt;&gt;&gt; 16&#xff0c;这个是位运算的操作&#xff0c;这个东西是把32位的二进制的数字&#xff0c;所有的bit往右侧右移了16位<br /> <img src="https://img-blog.csdnimg.cn/e5e7e707481e4f77822f2ace97a7d945.png#pic_center" alt="在这里插入图片描述" /></p> 
<p>第三步&#xff1a;用原hash值与右移16位的哈希值做异或操作<br /> <img src="https://img-blog.csdnimg.cn/8752d957c1b041d7aea3758ff3ab3785.png?x-oss-process&#61;image/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBASmF2Yeeoi-W6j-mxvA&#61;&#61;,size_20,color_FFFFFF,t_70,g_se,x_16#pic_center" alt="在这里插入图片描述" /></p> 
<p>提前在hash()函数里面&#xff0c;就会把高16位和低16位进行一下异或运算&#xff0c;就可以保证说&#xff0c;在hash值的低16位里面&#xff0c;可以同时保留他的高16位和低16位的特征</p> 
<p>相当于是在后面定位到数组index的位运算的时候&#xff0c;哪怕只有低16位参与了运算&#xff0c;其实运算的时候&#xff0c;他的hash值的高16位和低16位的特征都参与到了运算定位到那个数组的index</p> 
<p>这么做有什么好处呢&#xff1f;为什么要保证同时将高16位和低16位的特征同时纳入运算&#xff0c;考虑到数组index的定位中去呢&#xff1f;因为这样子可以保证降低hash冲突的概率&#xff0c;如果说直接用hash值的低16位去运算定位数组index的话&#xff0c;可能会导致一定的hash冲突</p> 
<p>为什么要做这么一个操作呢&#xff1f;hash算法里&#xff0c;为什么是hash值跟hash &gt;&gt;&gt; 16位的结果&#xff0c;异或运算的结果呢&#xff1f;他这么做的话&#xff0c;这里牵扯到很多数学的概念&#xff0c;暂时先记住结论就行</p> 
<p>目标是什么呢&#xff1f;通过这样的方式算出来的hash值&#xff0c;可以降低hash冲突的概率</p> 
<p>结论1&#xff1a;后面在用这个hash值定位到数组的index的时候&#xff0c;也有一个位运算&#xff0c;但是的话呢&#xff0c;一般那个后面的位运算&#xff0c;一般都是用低16位在进行运算&#xff0c;所以说如果你不把hash值的高16位和低16位进行运算的话&#xff0c;那么就会导致你后面在通过hash值找到数组index的时候&#xff0c;只有hash值的低16位参与了运算<br /> 结论2&#xff1a;这样可以把他原来的高16位变成低16位&#xff0c;他其实只取16位&#xff0c;相当于把高16位和低16位做了一个异或运算&#xff0c;在hash值的低16位里面&#xff0c;可以同时保留他的高16位和低16位的特征<br /> 结论3&#xff1a;数组index定位时&#xff0c;只取hash前16位</p> 
<p>继续关注put方法&#xff0c;才能完全看懂hash算法的优化</p> 
<h3><a id="put_695"></a>put操作原理</h3> 
<p>基础补充<br /> 与操作&#xff1a;两个位都为1时&#xff0c;结果才为1</p> 
<pre><code class="prism language-java"><span class="token keyword">public</span> <span class="token class-name">V</span> <span class="token function">put</span><span class="token punctuation">(</span><span class="token class-name">K</span> key<span class="token punctuation">,</span> <span class="token class-name">V</span> value<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
      <span class="token keyword">return</span> <span class="token function">putVal</span><span class="token punctuation">(</span><span class="token function">hash</span><span class="token punctuation">(</span>key<span class="token punctuation">)</span><span class="token punctuation">,</span> key<span class="token punctuation">,</span> value<span class="token punctuation">,</span> <span class="token boolean">false</span><span class="token punctuation">,</span> <span class="token boolean">true</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre> 
<pre><code class="prism language-java"><span class="token keyword">final</span> <span class="token class-name">V</span> <span class="token function">putVal</span><span class="token punctuation">(</span><span class="token keyword">int</span> hash<span class="token punctuation">,</span> <span class="token class-name">K</span> key<span class="token punctuation">,</span> <span class="token class-name">V</span> value<span class="token punctuation">,</span> <span class="token keyword">boolean</span> onlyIfAbsent<span class="token punctuation">,</span>
                   <span class="token keyword">boolean</span> evict<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        <span class="token class-name">Node</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">K</span><span class="token punctuation">,</span><span class="token class-name">V</span><span class="token punctuation">&gt;</span></span><span class="token punctuation">[</span><span class="token punctuation">]</span> tab<span class="token punctuation">;</span> <span class="token class-name">Node</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">K</span><span class="token punctuation">,</span><span class="token class-name">V</span><span class="token punctuation">&gt;</span></span> p<span class="token punctuation">;</span> <span class="token keyword">int</span> n<span class="token punctuation">,</span> i<span class="token punctuation">;</span>
        <span class="token comment">// 1.假设&#xff0c;hashmap是空的&#xff0c;通过resize扩容&#xff0c;数组大小就是默认的16&#xff0c;负载因子就是默认的12</span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token punctuation">(</span>tab <span class="token operator">&#61;</span> table<span class="token punctuation">)</span> <span class="token operator">&#61;&#61;</span> <span class="token keyword">null</span> <span class="token operator">||</span> <span class="token punctuation">(</span>n <span class="token operator">&#61;</span> tab<span class="token punctuation">.</span>length<span class="token punctuation">)</span> <span class="token operator">&#61;&#61;</span> <span class="token number">0</span><span class="token punctuation">)</span>
            n <span class="token operator">&#61;</span> <span class="token punctuation">(</span>tab <span class="token operator">&#61;</span> <span class="token function">resize</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">.</span>length<span class="token punctuation">;</span>
        <span class="token comment">// 2.这是一个寻址算法&#xff0c;用&amp;操作寻址&#xff0c;性能会比用取模高</span>
        <span class="token comment">// 2.1 n是数组的长度&#xff0c;用数组长度和hash做与运算</span>
        <span class="token comment">// 2.2在数组长度比较小的时候&#xff0c;高16基本上就废掉了</span>
        <span class="token comment">// 3.这个数组里的元素是空的</span>
        <span class="token comment">// 3.1这个分支&#xff0c;他的意思是说tab[i]&#xff0c;i就是hash定位到的数组index&#xff0c;tab[i]如果为空&#xff0c;也就是hash定位到的这个位置是空的&#xff0c;之前没有任何人在这里&#xff0c;此时直接是放一个Node在数组的这个位置即可</span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token punctuation">(</span>p <span class="token operator">&#61;</span> tab<span class="token punctuation">[</span>i <span class="token operator">&#61;</span> <span class="token punctuation">(</span>n <span class="token operator">-</span> <span class="token number">1</span><span class="token punctuation">)</span> <span class="token operator">&amp;</span> hash<span class="token punctuation">]</span><span class="token punctuation">)</span> <span class="token operator">&#61;&#61;</span> <span class="token keyword">null</span><span class="token punctuation">)</span>
        	<span class="token comment">// 3.2定位到数组了&#xff0c;那就把元素插入到链表或者红黑树里</span>
            tab<span class="token punctuation">[</span>i<span class="token punctuation">]</span> <span class="token operator">&#61;</span> <span class="token function">newNode</span><span class="token punctuation">(</span>hash<span class="token punctuation">,</span> key<span class="token punctuation">,</span> value<span class="token punctuation">,</span> <span class="token keyword">null</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token keyword">else</span> <span class="token punctuation">{<!-- --></span>
            <span class="token comment">// 4.hash定位到的数组位置&#xff0c;是已经有了Node了</span>
            <span class="token class-name">Node</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">K</span><span class="token punctuation">,</span><span class="token class-name">V</span><span class="token punctuation">&gt;</span></span> e<span class="token punctuation">;</span> <span class="token class-name">K</span> k<span class="token punctuation">;</span>
            <span class="token comment">// 5.相同的key&#xff08;会覆盖旧的value&#xff09;</span>
            <span class="token keyword">if</span> <span class="token punctuation">(</span>p<span class="token punctuation">.</span>hash <span class="token operator">&#61;&#61;</span> hash <span class="token operator">&amp;&amp;</span>
                <span class="token punctuation">(</span><span class="token punctuation">(</span>k <span class="token operator">&#61;</span> p<span class="token punctuation">.</span>key<span class="token punctuation">)</span> <span class="token operator">&#61;&#61;</span> key <span class="token operator">||</span> <span class="token punctuation">(</span>key <span class="token operator">!&#61;</span> <span class="token keyword">null</span> <span class="token operator">&amp;&amp;</span> key<span class="token punctuation">.</span><span class="token function">equals</span><span class="token punctuation">(</span>k<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
                e <span class="token operator">&#61;</span> p<span class="token punctuation">;</span>
    	<span class="token comment">// 6.红黑树</span>
            <span class="token keyword">else</span> <span class="token keyword">if</span> <span class="token punctuation">(</span>p <span class="token keyword">instanceof</span> <span class="token class-name">TreeNode</span><span class="token punctuation">)</span>
                e <span class="token operator">&#61;</span> <span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token class-name">TreeNode</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">K</span><span class="token punctuation">,</span><span class="token class-name">V</span><span class="token punctuation">&gt;</span></span><span class="token punctuation">)</span>p<span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">putTreeVal</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">,</span> tab<span class="token punctuation">,</span> hash<span class="token punctuation">,</span> key<span class="token punctuation">,</span> value<span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token keyword">else</span> <span class="token punctuation">{<!-- --></span>
    	     <span class="token comment">// 7.链表</span>
                <span class="token keyword">for</span> <span class="token punctuation">(</span><span class="token keyword">int</span> binCount <span class="token operator">&#61;</span> <span class="token number">0</span><span class="token punctuation">;</span> <span class="token punctuation">;</span> <span class="token operator">&#43;&#43;</span>binCount<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
                    <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token punctuation">(</span>e <span class="token operator">&#61;</span> p<span class="token punctuation">.</span>next<span class="token punctuation">)</span> <span class="token operator">&#61;&#61;</span> <span class="token keyword">null</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
                        p<span class="token punctuation">.</span>next <span class="token operator">&#61;</span> <span class="token function">newNode</span><span class="token punctuation">(</span>hash<span class="token punctuation">,</span> key<span class="token punctuation">,</span> value<span class="token punctuation">,</span> <span class="token keyword">null</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
                        <span class="token comment">// 8.如果链表的长度大于等于8的话&#xff0c;链表的总长度达到8的话&#xff0c;那么此时就需要将这个链表转换为一个红黑树的数据结构</span>
                        <span class="token comment">// 当你遍历到第8个节点&#xff0c;此时binCount是7&#xff0c;同时你挂上了第9个节点&#xff0c;然后就会发现binCount &gt;&#61; 7&#xff0c;达到了临界值&#xff0c;也就是说&#xff0c;当你的链表节点的数量超过8的时候&#xff0c;此时就会将链表转换为红黑树</span>
                        <span class="token keyword">if</span> <span class="token punctuation">(</span>binCount <span class="token operator">&gt;&#61;</span> TREEIFY_THRESHOLD <span class="token operator">-</span> <span class="token number">1</span><span class="token punctuation">)</span> <span class="token comment">// -1 for 1st</span>
                            <span class="token function">treeifyBin</span><span class="token punctuation">(</span>tab<span class="token punctuation">,</span> hash<span class="token punctuation">)</span><span class="token punctuation">;</span>
                        <span class="token keyword">break</span><span class="token punctuation">;</span>
                    <span class="token punctuation">}</span>
                    <span class="token comment">// 相同的key&#xff08;会覆盖旧的value&#xff09;</span>
                    <span class="token keyword">if</span> <span class="token punctuation">(</span>e<span class="token punctuation">.</span>hash <span class="token operator">&#61;&#61;</span> hash <span class="token operator">&amp;&amp;</span>
                        <span class="token punctuation">(</span><span class="token punctuation">(</span>k <span class="token operator">&#61;</span> e<span class="token punctuation">.</span>key<span class="token punctuation">)</span> <span class="token operator">&#61;&#61;</span> key <span class="token operator">||</span> <span class="token punctuation">(</span>key <span class="token operator">!&#61;</span> <span class="token keyword">null</span> <span class="token operator">&amp;&amp;</span> key<span class="token punctuation">.</span><span class="token function">equals</span><span class="token punctuation">(</span>k<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
                        <span class="token keyword">break</span><span class="token punctuation">;</span>
                    p <span class="token operator">&#61;</span> e<span class="token punctuation">;</span>
                <span class="token punctuation">}</span>
            <span class="token punctuation">}</span>
            <span class="token comment">// 9.相同的key&#xff0c;覆盖旧的value</span>
            <span class="token keyword">if</span> <span class="token punctuation">(</span>e <span class="token operator">!&#61;</span> <span class="token keyword">null</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span> <span class="token comment">// existing mapping for key</span>
                <span class="token class-name">V</span> oldValue <span class="token operator">&#61;</span> e<span class="token punctuation">.</span>value<span class="token punctuation">;</span>
                <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token operator">!</span>onlyIfAbsent <span class="token operator">||</span> oldValue <span class="token operator">&#61;&#61;</span> <span class="token keyword">null</span><span class="token punctuation">)</span>
                    e<span class="token punctuation">.</span>value <span class="token operator">&#61;</span> value<span class="token punctuation">;</span>
                <span class="token function">afterNodeAccess</span><span class="token punctuation">(</span>e<span class="token punctuation">)</span><span class="token punctuation">;</span>
                <span class="token keyword">return</span> oldValue<span class="token punctuation">;</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">}</span>
        <span class="token operator">&#43;&#43;</span>modCount<span class="token punctuation">;</span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token operator">&#43;&#43;</span>size <span class="token operator">&gt;</span> threshold<span class="token punctuation">)</span>
            <span class="token function">resize</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token function">afterNodeInsertion</span><span class="token punctuation">(</span>evict<span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token keyword">return</span> <span class="token keyword">null</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre> 
<p>注意&#xff1a;每次扩容&#xff0c;数组的大小就是2的n次方&#xff0c;只要保证数组的大小是2的n次方&#xff0c;就可以保证说&#xff0c;(n - 1) &amp; hash&#xff0c;可以保证就是hash % 数组.length取模的一样的效果&#xff0c;也就是说通过(n - 1) &amp; hash&#xff0c;就可以将任意一个hash值定位到数组的某个index里去</p> 
<h3><a id="JDK18_766"></a>JDK1.8红黑树优化</h3> 
<p>如果说出现大量的hash冲突之后&#xff0c;假设某给位置挂的一个链表特别的长&#xff0c;就很恶心了&#xff0c;如果链表长度太长的话&#xff0c;会导致有一些get()操作的时间复杂度就是O(n)&#xff0c;正常来说&#xff0c;table[i]数组索引直接定位的方式的话&#xff0c;O(1)</p> 
<p>但是如果链表&#xff0c;大量的key冲突&#xff0c;会导致get()操作&#xff0c;性能急剧下降&#xff0c;导致很多的问题</p> 
<p>所以说JDK 1.8以后人家优化了这块东西&#xff0c;会判断&#xff0c;如果链表的长度达到8的时候&#xff0c;那么就会将链表转换为红黑树&#xff0c;如果用红黑树的话&#xff0c;get()操作&#xff0c;即使对一个很大的红黑树进行二叉查找&#xff0c;那么时间复杂度会变成O(logn)&#xff0c;性能会比链表的O(n)得到大幅度的提升</p> 
<h3><a id="_773"></a>基于数组扩容原理</h3> 
<p>hashmap底层是基于数组来实现的核心的数据结构&#xff0c;如果是用数组的话&#xff0c;就天然会有一个问题&#xff0c;就跟ArrayList一样&#xff0c;就是数组如果满了&#xff0c;就必须要扩容&#xff0c;hashmap所以也是有扩容的问题存在的</p> 
<p>2倍扩容 &#43; rehash&#xff0c;2倍扩容之后&#xff0c;每个key-value对&#xff0c;都会基于key的hash值取模数组长度重新寻址找到新数组的新的位置</p> 
<p>hashmap扩容的原理&#xff0c;数组一次扩容2倍&#xff0c;rehash过程&#xff0c;基于key的hash值重新在新的数组里找到新的位置&#xff0c;很多key在新数组的位置都不一样了&#xff0c;如果是之前冲突的这个key可能就会在新的数组里分布在不同的位置上了</p> 
<p>这个原理大体上是JDK 1.7以前的原理&#xff0c;现在的话呢&#xff0c;JDK 1.8以后&#xff0c;都是数组大小是2的n次方扩容&#xff0c;用的是与操作符来实现hash寻址的算法&#xff0c;来进行扩容的时候&#xff0c;rehash</p> 
<p>JDK 1.8以后&#xff0c;为了提升rehash这个过程的性能&#xff0c;不是说简单的用key的hash值对新数组.length取模&#xff0c;取模给大家讲过&#xff0c;性能较低&#xff0c;所以JDK 1.8以后hash寻址这块&#xff0c;用的与操作</p> 
<p>此时&#xff0c;上面两个hash值会出现hash碰撞的问题&#xff0c;使用链表&#xff0c;或者是红黑树来解决</p> 
<p>如果数组的长度扩容之后 &#61; 32&#xff0c;重新对每个hash值进行寻址&#xff0c;也就是用每个hash值跟新数组的length - 1进行与操作</p> 
<p>hash2的位置&#xff0c;从原来的5变成了21&#xff0c;规律是什么&#xff1f;</p> 
<p>也就是说&#xff0c;JDK 1.8&#xff0c;扩容一定是2的倍数&#xff0c;从16到32到64到128</p> 
<p>就可以保证说&#xff0c;每次扩容之后&#xff0c;你的每个hash值要么是停留在原来的那个index的地方&#xff0c;要么是变成了原来的index&#xff08;5&#xff09; &#43; oldCap&#xff08;16&#xff09; &#61; 21</p> 
<p>所以说&#xff0c;这个就是JDK 1.8以后&#xff0c;数组扩容的时候&#xff0c;元素重新寻址的一个过程和原理</p> 
<p>如果面试官问你&#xff0c;hashmap的底层原理<br /> &#xff08;1&#xff09;hash算法&#xff1a;为什么要高位和低位做异或运算&#xff1f;<br /> &#xff08;2&#xff09;hash寻址&#xff1a;为什么是hash值和数组.length - 1进行与运算&#xff1f;<br /> &#xff08;3&#xff09;hash冲突的机制&#xff1a;链表&#xff0c;超过8个以后&#xff0c;红黑树<br /> &#xff08;4&#xff09;扩容机制&#xff1a;数组2倍扩容&#xff0c;重新寻址&#xff08;rehash&#xff09;&#xff0c;hash &amp; n - 1&#xff0c;判断二进制结果中是否多出一个bit的1&#xff0c;如果没多&#xff0c;那么就是原来的index&#xff0c;如果多了出来&#xff0c;那么就是index &#43; oldCap&#xff0c;通过这个方式&#xff0c;就避免了rehash的时候&#xff0c;用每个hash对新数组.length取模&#xff0c;取模性能不高&#xff0c;位运算的性能比较高</p> 
<p>通过这个方式的话&#xff0c;可以有效的将原来冲突在一个位置的多个key&#xff0c;给分散到新数组的不同的位置去</p> 
<h3><a id="get_807"></a>get()</h3> 
<pre><code class="prism language-java"><span class="token keyword">public</span> <span class="token class-name">V</span> <span class="token function">get</span><span class="token punctuation">(</span><span class="token class-name">Object</span> key<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
     <span class="token class-name">Node</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">K</span><span class="token punctuation">,</span><span class="token class-name">V</span><span class="token punctuation">&gt;</span></span> e<span class="token punctuation">;</span>
     <span class="token comment">// 1.计算key的hash值</span>
     <span class="token keyword">return</span> <span class="token punctuation">(</span>e <span class="token operator">&#61;</span> <span class="token function">getNode</span><span class="token punctuation">(</span><span class="token function">hash</span><span class="token punctuation">(</span>key<span class="token punctuation">)</span><span class="token punctuation">,</span> key<span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token operator">&#61;&#61;</span> <span class="token keyword">null</span> <span class="token operator">?</span> <span class="token keyword">null</span> <span class="token operator">:</span> e<span class="token punctuation">.</span>value<span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token keyword">final</span> <span class="token class-name">Node</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">K</span><span class="token punctuation">,</span><span class="token class-name">V</span><span class="token punctuation">&gt;</span></span> <span class="token function">getNode</span><span class="token punctuation">(</span><span class="token keyword">int</span> hash<span class="token punctuation">,</span> <span class="token class-name">Object</span> key<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        <span class="token class-name">Node</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">K</span><span class="token punctuation">,</span><span class="token class-name">V</span><span class="token punctuation">&gt;</span></span><span class="token punctuation">[</span><span class="token punctuation">]</span> tab<span class="token punctuation">;</span> <span class="token class-name">Node</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">K</span><span class="token punctuation">,</span><span class="token class-name">V</span><span class="token punctuation">&gt;</span></span> first<span class="token punctuation">,</span> e<span class="token punctuation">;</span> <span class="token keyword">int</span> n<span class="token punctuation">;</span> <span class="token class-name">K</span> k<span class="token punctuation">;</span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token punctuation">(</span>tab <span class="token operator">&#61;</span> table<span class="token punctuation">)</span> <span class="token operator">!&#61;</span> <span class="token keyword">null</span> <span class="token operator">&amp;&amp;</span> <span class="token punctuation">(</span>n <span class="token operator">&#61;</span> tab<span class="token punctuation">.</span>length<span class="token punctuation">)</span> <span class="token operator">&gt;</span> <span class="token number">0</span> <span class="token operator">&amp;&amp;</span>
        	<span class="token comment">// 1.先确定数组下标</span>
            <span class="token punctuation">(</span>first <span class="token operator">&#61;</span> tab<span class="token punctuation">[</span><span class="token punctuation">(</span>n <span class="token operator">-</span> <span class="token number">1</span><span class="token punctuation">)</span> <span class="token operator">&amp;</span> hash<span class="token punctuation">]</span><span class="token punctuation">)</span> <span class="token operator">!&#61;</span> <span class="token keyword">null</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    	<span class="token comment">// 2.如果第一个节点的hash和当前值的hash相等&#xff0c;且值也相等&#xff0c;直接返回</span>
            <span class="token keyword">if</span> <span class="token punctuation">(</span>first<span class="token punctuation">.</span>hash <span class="token operator">&#61;&#61;</span> hash <span class="token operator">&amp;&amp;</span> <span class="token comment">// always check first node</span>
                <span class="token punctuation">(</span><span class="token punctuation">(</span>k <span class="token operator">&#61;</span> first<span class="token punctuation">.</span>key<span class="token punctuation">)</span> <span class="token operator">&#61;&#61;</span> key <span class="token operator">||</span> <span class="token punctuation">(</span>key <span class="token operator">!&#61;</span> <span class="token keyword">null</span> <span class="token operator">&amp;&amp;</span> key<span class="token punctuation">.</span><span class="token function">equals</span><span class="token punctuation">(</span>k<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
                <span class="token keyword">return</span> first<span class="token punctuation">;</span>
            <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token punctuation">(</span>e <span class="token operator">&#61;</span> first<span class="token punctuation">.</span>next<span class="token punctuation">)</span> <span class="token operator">!&#61;</span> <span class="token keyword">null</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
                <span class="token comment">// 3.如果是红黑树&#xff0c;走红黑树获取节点方法</span>
                <span class="token keyword">if</span> <span class="token punctuation">(</span>first <span class="token keyword">instanceof</span> <span class="token class-name">TreeNode</span><span class="token punctuation">)</span>
                    <span class="token keyword">return</span> <span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token class-name">TreeNode</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">K</span><span class="token punctuation">,</span><span class="token class-name">V</span><span class="token punctuation">&gt;</span></span><span class="token punctuation">)</span>first<span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getTreeNode</span><span class="token punctuation">(</span>hash<span class="token punctuation">,</span> key<span class="token punctuation">)</span><span class="token punctuation">;</span>
    	     <span class="token comment">// 4.如果是链表&#xff0c;遍历链表比较</span>
                <span class="token keyword">do</span> <span class="token punctuation">{<!-- --></span>
                    <span class="token keyword">if</span> <span class="token punctuation">(</span>e<span class="token punctuation">.</span>hash <span class="token operator">&#61;&#61;</span> hash <span class="token operator">&amp;&amp;</span>
                        <span class="token punctuation">(</span><span class="token punctuation">(</span>k <span class="token operator">&#61;</span> e<span class="token punctuation">.</span>key<span class="token punctuation">)</span> <span class="token operator">&#61;&#61;</span> key <span class="token operator">||</span> <span class="token punctuation">(</span>key <span class="token operator">!&#61;</span> <span class="token keyword">null</span> <span class="token operator">&amp;&amp;</span> key<span class="token punctuation">.</span><span class="token function">equals</span><span class="token punctuation">(</span>k<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
                        <span class="token keyword">return</span> e<span class="token punctuation">;</span>
                <span class="token punctuation">}</span> <span class="token keyword">while</span> <span class="token punctuation">(</span><span class="token punctuation">(</span>e <span class="token operator">&#61;</span> e<span class="token punctuation">.</span>next<span class="token punctuation">)</span> <span class="token operator">!&#61;</span> <span class="token keyword">null</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">}</span>
        <span class="token keyword">return</span> <span class="token keyword">null</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre> 
<h2><a id="2LinkedHashMap_841"></a>2.LinkedHashMap</h2> 
<p>LinkedHashMap内部维护了一个双向链表&#xff0c;能保证元素按插入的顺序访问&#xff0c;也能以访问顺序访问&#xff0c;可以用来实现LRU缓存策略。</p> 
<p>HashMap&#xff0c;比如你放了一堆key-value对进去&#xff0c;后面的话呢如果你要遍历这个HashMap的话&#xff0c;遍历的顺序&#xff0c;并不是按照你插入的key-value的顺序来的。</p> 
<p>LinkedHashMap&#xff0c;他会记录你插入key-value的顺序&#xff0c; 如果你在遍历的时候&#xff0c;他是按照插入key-value对的顺序给你遍历出来的</p> 
<p><img src="https://img-blog.csdnimg.cn/8dadbe5dc8aa4c19a1c8c8ce9ebeca49.png?x-oss-process&#61;image/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBASmF2Yeeoi-W6j-mxvA&#61;&#61;,size_16,color_FFFFFF,t_70,g_se,x_16#pic_center" alt="在这里插入图片描述" /></p> 
<p>核心属性</p> 
<pre><code class="prism language-java"><span class="token comment">/**
* 双向链表头结点
*/</span>
<span class="token keyword">transient</span> <span class="token class-name">LinkedHashMap<span class="token punctuation">.</span>Entry</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">K</span><span class="token punctuation">,</span><span class="token class-name">V</span><span class="token punctuation">&gt;</span></span> head<span class="token punctuation">;</span>

<span class="token comment">/**
* 双向链表尾结点
*/</span>
<span class="token keyword">transient</span> <span class="token class-name">LinkedHashMap<span class="token punctuation">.</span>Entry</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">K</span><span class="token punctuation">,</span><span class="token class-name">V</span><span class="token punctuation">&gt;</span></span> tail<span class="token punctuation">;</span>

<span class="token comment">/**
* 是否按访问顺序排序
*/</span>
<span class="token keyword">final</span> <span class="token keyword">boolean</span> accessOrder<span class="token punctuation">;</span>
</code></pre> 
<p>&#xff08;1&#xff09;head双向链表的头节点&#xff0c;旧数据存在头节点。<br /> &#xff08;2&#xff09;tail双向链表的尾节点&#xff0c;新数据存在尾节点。<br /> &#xff08;3&#xff09;accessOrder是否需要按访问顺序排序&#xff0c;如果为false则按插入顺序存储元素&#xff0c;如果是true则按访问顺序存储元素。</p> 
<p>在调用LinkedHashMap的put()方法的时候&#xff0c;其实调用的是父类HashMap的put()方法</p> 
<h3><a id="newNode_874"></a>newNode()</h3> 
<p>LinkedHashMap重写了HashMap的newNode()方法</p> 
<pre><code class="prism language-java"><span class="token class-name">Node</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">K</span><span class="token punctuation">,</span><span class="token class-name">V</span><span class="token punctuation">&gt;</span></span> <span class="token function">newNode</span><span class="token punctuation">(</span><span class="token keyword">int</span> hash<span class="token punctuation">,</span> <span class="token class-name">K</span> key<span class="token punctuation">,</span> <span class="token class-name">V</span> value<span class="token punctuation">,</span> <span class="token class-name">Node</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">K</span><span class="token punctuation">,</span><span class="token class-name">V</span><span class="token punctuation">&gt;</span></span> e<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        <span class="token class-name">LinkedHashMap<span class="token punctuation">.</span>Entry</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">K</span><span class="token punctuation">,</span><span class="token class-name">V</span><span class="token punctuation">&gt;</span></span> p <span class="token operator">&#61;</span>
            <span class="token keyword">new</span> <span class="token class-name">LinkedHashMap<span class="token punctuation">.</span>Entry</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">K</span><span class="token punctuation">,</span><span class="token class-name">V</span><span class="token punctuation">&gt;</span></span><span class="token punctuation">(</span>hash<span class="token punctuation">,</span> key<span class="token punctuation">,</span> value<span class="token punctuation">,</span> e<span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token function">linkNodeLast</span><span class="token punctuation">(</span>p<span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token keyword">return</span> p<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre> 
<pre><code class="prism language-java"><span class="token keyword">private</span> <span class="token keyword">void</span> <span class="token function">linkNodeLast</span><span class="token punctuation">(</span><span class="token class-name">LinkedHashMap<span class="token punctuation">.</span>Entry</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">K</span><span class="token punctuation">,</span><span class="token class-name">V</span><span class="token punctuation">&gt;</span></span> p<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        <span class="token class-name">LinkedHashMap<span class="token punctuation">.</span>Entry</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">K</span><span class="token punctuation">,</span><span class="token class-name">V</span><span class="token punctuation">&gt;</span></span> last <span class="token operator">&#61;</span> tail<span class="token punctuation">;</span>
        tail <span class="token operator">&#61;</span> p<span class="token punctuation">;</span>
        <span class="token comment">// 一开始这个链表里就一个节点&#xff0c;所以tail和head两个指针&#xff0c;都会指向这个p</span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span>last <span class="token operator">&#61;&#61;</span> <span class="token keyword">null</span><span class="token punctuation">)</span>
            head <span class="token operator">&#61;</span> p<span class="token punctuation">;</span>
        <span class="token keyword">else</span> <span class="token punctuation">{<!-- --></span>
            p<span class="token punctuation">.</span>before <span class="token operator">&#61;</span> last<span class="token punctuation">;</span>
            last<span class="token punctuation">.</span>after <span class="token operator">&#61;</span> p<span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre> 
<p>LinkedHashMap内部维护了一个双向链表&#xff0c;head&#xff08;双向链表头结点&#xff09;、tail&#xff08;双向链表尾结点&#xff09;</p> 
<p>补充&#xff1a;<br /> HashMap的newNode创建的是HashMap的内部类Node&#xff0c;Node实现了Map.Entry<br /> LinkedHashMap的newNode创建的是LinkedHashMap的内部类Entry&#xff0c;Entry继承了HashMap.Node</p> 
<h3><a id="afterNodeInsertion_905"></a>afterNodeInsertion</h3> 
<p>调用完put()方法&#xff0c;插入一个key-value对之后&#xff0c;其实就会调用afterNodeInsertion(evict);&#xff0c;LinkedHashMap重写了afterNodeInsertion(evict)方法</p> 
<pre><code class="prism language-java"><span class="token keyword">void</span> <span class="token function">afterNodeInsertion</span><span class="token punctuation">(</span><span class="token keyword">boolean</span> evict<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span> <span class="token comment">// possibly remove eldest</span>
        <span class="token class-name">LinkedHashMap<span class="token punctuation">.</span>Entry</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">K</span><span class="token punctuation">,</span><span class="token class-name">V</span><span class="token punctuation">&gt;</span></span> first<span class="token punctuation">;</span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span>evict <span class="token operator">&amp;&amp;</span> <span class="token punctuation">(</span>first <span class="token operator">&#61;</span> head<span class="token punctuation">)</span> <span class="token operator">!&#61;</span> <span class="token keyword">null</span> <span class="token operator">&amp;&amp;</span> <span class="token function">removeEldestEntry</span><span class="token punctuation">(</span>first<span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
            <span class="token class-name">K</span> key <span class="token operator">&#61;</span> first<span class="token punctuation">.</span>key<span class="token punctuation">;</span>
            <span class="token function">removeNode</span><span class="token punctuation">(</span><span class="token function">hash</span><span class="token punctuation">(</span>key<span class="token punctuation">)</span><span class="token punctuation">,</span> key<span class="token punctuation">,</span> <span class="token keyword">null</span><span class="token punctuation">,</span> <span class="token boolean">false</span><span class="token punctuation">,</span> <span class="token boolean">true</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre> 
<p>evict&#xff1a;驱逐的意思<br /> &#xff08;1&#xff09;如果evict为true&#xff0c;且头节点不为空&#xff0c;且确定移除最老的元素&#xff0c;那么就调用HashMap.removeNode()把头节点移除&#xff08;这里的头节点是双向链表的头节点&#xff0c;而不是某个桶中的第一个元素&#xff09;&#xff1b;<br /> &#xff08;2&#xff09;HashMap.removeNode()从HashMap中把这个节点移除之后&#xff0c;会调用afterNodeRemoval()方法&#xff1b;<br /> &#xff08;3&#xff09;afterNodeRemoval()方法在LinkedHashMap中也有实现&#xff0c;用来在移除元素后修改双向链表;<br /> &#xff08;4&#xff09;默认removeEldestEntry()方法返回false&#xff0c;也就是不删除元素。</p> 
<h3><a id="afterNodeAccess_922"></a>afterNodeAccess</h3> 
<p>但是如果accessOrder是true的话&#xff0c;那么如果你get一个key&#xff0c;或者是覆盖这个key的值&#xff0c;就会导致个key-value对顺序会在链表里改变&#xff0c;他会被挪动到链表的尾部去&#xff0c;如果你把accessOrder指定为true&#xff0c;你每次修改一个key的值&#xff0c;或者是get访问一下这个key&#xff0c;都会导致这个key挪动到链表的尾部去</p> 
<p>补充&#xff1a;可以通过构造器指定accessOrder&#xff0c;默认false</p> 
<p>总结<br /> &#xff08;1&#xff09;LinkedHashMap继承自HashMap&#xff0c;具有HashMap的所有特性&#xff1b;<br /> &#xff08;2&#xff09;LinkedHashMap内部维护了一个双向链表存储所有的元素&#xff1b;<br /> &#xff08;3&#xff09;如果accessOrder为false&#xff0c;则可以按插入元素的顺序遍历元素&#xff1b;<br /> &#xff08;4&#xff09;如果accessOrder为true&#xff0c;则可以按访问元素的顺序遍历元素&#xff1b;<br /> &#xff08;5&#xff09;LinkedHashMap的实现非常精妙&#xff0c;很多方法都是在HashMap中留的钩子&#xff08;Hook&#xff09;&#xff0c;直接实现这些Hook就可以实现对应的功能了&#xff0c;并不需要再重写put()等方法&#xff1b;<br /> &#xff08;6&#xff09;默认的LinkedHashMap并不会移除旧元素&#xff0c;如果需要移除旧元素&#xff0c;则需要重写removeEldestEntry()方法设定移除策略&#xff1b;<br /> &#xff08;7&#xff09;LinkedHashMap可以用来实现LRU缓存淘汰策略&#xff1b;</p> 
<h2><a id="3TreeMap_937"></a>3.TreeMap</h2> 
<p>TreeMap使用红黑树存储元素&#xff0c;按key的自然顺序来排序。<br /> <img src="https://img-blog.csdnimg.cn/dc34303934fb4515a39f54595721cfa9.png?x-oss-process&#61;image/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBASmF2Yeeoi-W6j-mxvA&#61;&#61;,size_20,color_FFFFFF,t_70,g_se,x_16#pic_center" alt="在这里插入图片描述" /><br /> TreeMap实现了Map、SortedMap、NavigableMap、Cloneable、Serializable等接口。</p> 
<pre><code class="prism language-java"><span class="token keyword">public</span> <span class="token class-name">V</span> <span class="token function">put</span><span class="token punctuation">(</span><span class="token class-name">K</span> key<span class="token punctuation">,</span> <span class="token class-name">V</span> value<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        <span class="token class-name">Entry</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">K</span><span class="token punctuation">,</span><span class="token class-name">V</span><span class="token punctuation">&gt;</span></span> t <span class="token operator">&#61;</span> root<span class="token punctuation">;</span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span>t <span class="token operator">&#61;&#61;</span> <span class="token keyword">null</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
            <span class="token function">compare</span><span class="token punctuation">(</span>key<span class="token punctuation">,</span> key<span class="token punctuation">)</span><span class="token punctuation">;</span> <span class="token comment">// type (and possibly null) check</span>

            root <span class="token operator">&#61;</span> <span class="token keyword">new</span> <span class="token class-name">Entry</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token punctuation">&gt;</span></span><span class="token punctuation">(</span>key<span class="token punctuation">,</span> value<span class="token punctuation">,</span> <span class="token keyword">null</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            size <span class="token operator">&#61;</span> <span class="token number">1</span><span class="token punctuation">;</span>
            modCount<span class="token operator">&#43;&#43;</span><span class="token punctuation">;</span>
            <span class="token keyword">return</span> <span class="token keyword">null</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
        <span class="token keyword">int</span> cmp<span class="token punctuation">;</span>
        <span class="token class-name">Entry</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">K</span><span class="token punctuation">,</span><span class="token class-name">V</span><span class="token punctuation">&gt;</span></span> parent<span class="token punctuation">;</span>
        <span class="token comment">// split comparator and comparable paths</span>
        <span class="token class-name">Comparator</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token operator">?</span> <span class="token keyword">super</span> <span class="token class-name">K</span><span class="token punctuation">&gt;</span></span> cpr <span class="token operator">&#61;</span> comparator<span class="token punctuation">;</span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span>cpr <span class="token operator">!&#61;</span> <span class="token keyword">null</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
            <span class="token keyword">do</span> <span class="token punctuation">{<!-- --></span>
                parent <span class="token operator">&#61;</span> t<span class="token punctuation">;</span>
                cmp <span class="token operator">&#61;</span> cpr<span class="token punctuation">.</span><span class="token function">compare</span><span class="token punctuation">(</span>key<span class="token punctuation">,</span> t<span class="token punctuation">.</span>key<span class="token punctuation">)</span><span class="token punctuation">;</span>
                <span class="token keyword">if</span> <span class="token punctuation">(</span>cmp <span class="token operator">&lt;</span> <span class="token number">0</span><span class="token punctuation">)</span>
                    t <span class="token operator">&#61;</span> t<span class="token punctuation">.</span>left<span class="token punctuation">;</span>
                <span class="token keyword">else</span> <span class="token keyword">if</span> <span class="token punctuation">(</span>cmp <span class="token operator">&gt;</span> <span class="token number">0</span><span class="token punctuation">)</span>
                    t <span class="token operator">&#61;</span> t<span class="token punctuation">.</span>right<span class="token punctuation">;</span>
                <span class="token keyword">else</span>
                    <span class="token keyword">return</span> t<span class="token punctuation">.</span><span class="token function">setValue</span><span class="token punctuation">(</span>value<span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token punctuation">}</span> <span class="token keyword">while</span> <span class="token punctuation">(</span>t <span class="token operator">!&#61;</span> <span class="token keyword">null</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
        <span class="token keyword">else</span> <span class="token punctuation">{<!-- --></span>
            <span class="token keyword">if</span> <span class="token punctuation">(</span>key <span class="token operator">&#61;&#61;</span> <span class="token keyword">null</span><span class="token punctuation">)</span>
                <span class="token keyword">throw</span> <span class="token keyword">new</span> <span class="token class-name">NullPointerException</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token annotation punctuation">&#64;SuppressWarnings</span><span class="token punctuation">(</span><span class="token string">&#34;unchecked&#34;</span><span class="token punctuation">)</span>
                <span class="token class-name">Comparable</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token operator">?</span> <span class="token keyword">super</span> <span class="token class-name">K</span><span class="token punctuation">&gt;</span></span> k <span class="token operator">&#61;</span> <span class="token punctuation">(</span><span class="token class-name">Comparable</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token operator">?</span> <span class="token keyword">super</span> <span class="token class-name">K</span><span class="token punctuation">&gt;</span></span><span class="token punctuation">)</span> key<span class="token punctuation">;</span>
            <span class="token keyword">do</span> <span class="token punctuation">{<!-- --></span>
                parent <span class="token operator">&#61;</span> t<span class="token punctuation">;</span>
                cmp <span class="token operator">&#61;</span> k<span class="token punctuation">.</span><span class="token function">compareTo</span><span class="token punctuation">(</span>t<span class="token punctuation">.</span>key<span class="token punctuation">)</span><span class="token punctuation">;</span>
                <span class="token keyword">if</span> <span class="token punctuation">(</span>cmp <span class="token operator">&lt;</span> <span class="token number">0</span><span class="token punctuation">)</span>
                    t <span class="token operator">&#61;</span> t<span class="token punctuation">.</span>left<span class="token punctuation">;</span>
                <span class="token keyword">else</span> <span class="token keyword">if</span> <span class="token punctuation">(</span>cmp <span class="token operator">&gt;</span> <span class="token number">0</span><span class="token punctuation">)</span>
                    t <span class="token operator">&#61;</span> t<span class="token punctuation">.</span>right<span class="token punctuation">;</span>
                <span class="token keyword">else</span>
                    <span class="token keyword">return</span> t<span class="token punctuation">.</span><span class="token function">setValue</span><span class="token punctuation">(</span>value<span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token punctuation">}</span> <span class="token keyword">while</span> <span class="token punctuation">(</span>t <span class="token operator">!&#61;</span> <span class="token keyword">null</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
        <span class="token class-name">Entry</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">K</span><span class="token punctuation">,</span><span class="token class-name">V</span><span class="token punctuation">&gt;</span></span> e <span class="token operator">&#61;</span> <span class="token keyword">new</span> <span class="token class-name">Entry</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token punctuation">&gt;</span></span><span class="token punctuation">(</span>key<span class="token punctuation">,</span> value<span class="token punctuation">,</span> parent<span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span>cmp <span class="token operator">&lt;</span> <span class="token number">0</span><span class="token punctuation">)</span>
            parent<span class="token punctuation">.</span>left <span class="token operator">&#61;</span> e<span class="token punctuation">;</span>
        <span class="token keyword">else</span>
            parent<span class="token punctuation">.</span>right <span class="token operator">&#61;</span> e<span class="token punctuation">;</span>
        <span class="token function">fixAfterInsertion</span><span class="token punctuation">(</span>e<span class="token punctuation">)</span><span class="token punctuation">;</span>
        size<span class="token operator">&#43;&#43;</span><span class="token punctuation">;</span>
        modCount<span class="token operator">&#43;&#43;</span><span class="token punctuation">;</span>
        <span class="token keyword">return</span> <span class="token keyword">null</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre> 
<p>TreeMap底层的Entry实现了Map.Entry&#xff0c;里面包含left&#xff08;左节点&#xff09;、right&#xff08;右节点&#xff09;、parent&#xff08;父节点&#xff09;、color&#xff08;颜色&#xff09;</p> 
<h1><a id="Set_999"></a>三、Set</h1> 
<h2><a id="1HashSet_1000"></a>1.HashSet</h2> 
<p>比如说HashSet就是基于HashMap来实现的</p> 
<p>HashSet&#xff0c;他其实就是说一个集合&#xff0c;里面的元素是无序的&#xff0c;他里面的元素不能重复的&#xff0c;HashMap的key是无顺序的&#xff0c;你插入进去的顺序&#xff0c;跟你迭代遍历的顺序是不一样的&#xff0c;而且HashMap的key是没有重复的&#xff0c;HashSet可以直接基于HashMap来实现</p> 
<h2><a id="2LinkedHashSet_1006"></a>2.LinkedHashSet</h2> 
<p>LinkedHashSet&#xff0c;他是有顺序的set&#xff0c;也就是维持了插入set的这个顺序&#xff0c;你迭代LinkedHashSet的顺序跟你插入的顺序是一样的&#xff0c;底层直接就可以基于LinkedHashMap来实现</p> 
<h2><a id="3TreeSet_1010"></a>3.TreeSet</h2> 
<p>TreeSet&#xff0c;默认是根据你插入进去的元素的值来排序的&#xff0c;而且可以定制Comparator&#xff0c;自己决定排序的算法和逻辑&#xff0c;他底层可以基于TreeMap来实现</p> 
<p>Set底层的Map&#xff0c;只有key是有值的&#xff0c;value都是null值&#xff0c;都是空的</p>
                </div>
                <link href="https://csdnimg.cn/release/blogv2/dist/mdeditor/css/editerView/markdown_views-d7a94ec6ab.css" rel="stylesheet">
                <link href="https://csdnimg.cn/release/blogv2/dist/mdeditor/css/style-49037e4d27.css" rel="stylesheet">
        </div>
    </article>
</div>
            <div class="hide-article-box hide-article-pos text-center">
                    <a class="btn-readmore no-login" href="https://passport.csdn.net/account/login" target="_blank" rel="noopener" data-report-view='{"mod":"popu_376","spm":"1001.2101.3001.4248","dest":"https://blog.csdn.net/qq_35620342/article/details/119947254","strategy":"fans-readmore-login","ab":"new"}' data-report-click='{"mod":"popu_376","spm":"1001.2101.3001.4248","dest":"https://blog.csdn.net/qq_35620342/article/details/119947254","strategy":"fans-readmore-login","ab":"new","extend1":"粉丝未登录阅读更多"}'>
                        <span class="follow-text">关注博主即可阅读全文</span>
                        <img class="chevrondown" src="https://csdnimg.cn/release/blogv2/dist/pc/img/arrowDownAttend.png">
                    </a>
            </div>
<div class="more-toolbox-new" id="toolBarBox">
    <div class="left-toolbox">
        <div class="toolbox-left">
            <div class="profile-box"><a class="profile-href" target="_blank" href="https://blog.csdn.net/qq_35620342"><img class="profile-img" src="https://profile.csdnimg.cn/B/0/A/3_qq_35620342"><span class="profile-name">Java程序鱼</span></a></div>
            <div class="profile-attend">
                    <a class="tool-attend tool-bt-button tool-bt-attend" href="javascript:;" data-report-view='{"mod":"1592215036_002","spm":"1001.2101.3001.4232","extend1":"关注"}'>关注</a>
                <a class="tool-item-follow active-animation" style="display:none;">关注</a>
            </div>
        </div>
        <div class="toolbox-middle">
        <ul class="toolbox-list">
            <li class="tool-item tool-item-size tool-active is-like" id="is-like">
            <a class="tool-item-href">
                <img style="display:none;" id="is-like-imgactive-animation-like" class="animation-dom active-animation" src="https://csdnimg.cn/release/blogv2/dist/pc/img/tobarThumbUpactive.png" alt="">
                <img class="isactive" style="display:none" id="is-like-imgactive" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newHeart1Active.png" alt="">
                <img class="isdefault" style="display:block" id="is-like-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newHeart1White.png" alt="">  
                <span id="spanCount" class="count ">
                        172
                </span>
            </a>
            <div class="tool-hover-tip"><span class="text space">点赞</span></div>
            </li>
            <li class="tool-item tool-item-size tool-active tool-item-comment">
            <a class="tool-item-href" href="#commentBox">
                <img class="isdefault" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newCommentWhite.png" alt="">
                <span class="count">
                    99
                </span>
            </a>
            <div class="tool-hover-tip"><span class="text space">评论</span></div>
            </li>
            <li class="tool-item tool-item-size tool-active is-collection ">
            <a class="tool-item-href" href="javascript:;" data-report-click='{"mod":"popu_824","spm":"1001.2101.3001.4130","ab":"new"}'>
                <img style="display:none" id="is-collection-img-collection" class="animation-dom active-animation" src="https://csdnimg.cn/release/blogv2/dist/pc/img/tobarCollectionActive.png" alt="">
                <img class="isdefault" id="is-collection-img" style="display:block" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newCollectWhite.png" alt="">
                <img class="isactive" id="is-collection-imgactive" style="display:none" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newCollectActive.png" alt="">
                <span class="count get-collection " id="get-collection">
                    1073
                </span>
            </a>
            <div class="tool-hover-tip"><span class="text space">收藏</span></div>
            </li>
            <li class="tool-item tool-active">
                <a class="" href="javascript:;">
                    <img class="company active" id="health-companies" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newHealthCompanies1Active.gif" alt="一键三连">
                </a>
                <div class="tool-hover-tip three-click"><span class="text">一键三连</span></div>
            </li>
            <li class="tool-item tool-item-bar">
            </li>
            <li class="tool-item tool-item-size tool-active tool-QRcode" id="tool-share">
                <a class="tool-item-href" href="javascript:;" data-report-click='{"mod":"1582594662_002","spm":"1001.2101.3001.4129","ab":"new"}'>
                    <img class="isdefault" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newShareWhite.png" alt="">
                </a>
                <div class="QRcode" id="tool-QRcode">
                    <p class="title">
                    扫一扫，分享海报
                    </p>
                    <div id='shareCode'></div>
                </div>
            </li>
        </ul>
        </div>
        <div class="toolbox-right">
                <div class="tool-directory">
                    <a class="bt-columnlist-show"
                    data-id="11278274"
                    data-free="true"
                    data-subscribe="false"
                    data-title="面试题专栏"
                    data-img="https://img-blog.csdnimg.cn/20210829110515682.png?x-oss-process=image/resize,m_fixed,h_224,w_224"
                    data-url="https://blog.csdn.net/qq_35620342/category_11278274.html"
                    data-sum="20"
                    data-people="51"
                    data-price="0"
                    data-oldprice="0"
                    data-join="false"
                    data-studyvip="false"
                    data-studysubscribe="false"
                    data-report-view='{"spm":"1001.2101.3001.6334","extend1":"专栏目录"}'
                    data-report-click='{"spm":"1001.2101.3001.6334","extend1":"专栏目录"}'
                    >专栏目录</a>
                </div>
        </div>
    </div>  
</div>
<script type=text/javascript crossorigin src="https://csdnimg.cn/release/phoenix/production/qrcode-7c90a92189.min.js"></script>
<script src="//g.csdnimg.cn/??sharewx/1.2.1/sharewx.js" type="text/javascript"></script>
<script type="text/javascript" crossorigin src="https://g.csdnimg.cn/user-login/3.0.1/user-login.js"></script>
<script type="text/javascript" crossorigin src="https://g.csdnimg.cn/collection-box/2.0.6/collection-box.js"></script>
                <div class="first-recommend-box recommend-box">
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/Javawithme/article/details/120325851"  data-report-view='{"ab":"new","mod":"popu_871","extra":"{\"utm_medium\":\"distribute.pc_relevant_t0.587853\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","index":"1","style":"text_1","strategy":"32_587853_RCMD","dest":"https://blog.csdn.net/Javawithme/article/details/120325851"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/Javawithme/article/details/120325851" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_871","extra":"{\"utm_medium\":\"distribute.pc_relevant_t0.587853\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","index":"1","style":"text_1","strategy":"32_587853_RCMD","dest":"https://blog.csdn.net/Javawithme/article/details/120325851"}'  data-report-query='utm_medium=distribute.pc_relevant_t0.587853&depth_1-utm_source=distribute.pc_relevant_t0.587853'>
					<div class="left ellipsis-online ellipsis-online-1">谁说专科学历找不到<em>java</em>工作？自学<em>java</em>，第一份工作13k</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/Javawithme" target="_blank"><span class="blog-title">Javawithme的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">09-16</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					610
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/Javawithme/article/details/120325851" target="_blank"  data-report-click='{"ab":"new","mod":"popu_871","extra":"{\"utm_medium\":\"distribute.pc_relevant_t0.587853\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","index":"1","style":"text_1","strategy":"32_587853_RCMD","dest":"https://blog.csdn.net/Javawithme/article/details/120325851"}'  data-report-query='utm_medium=distribute.pc_relevant_t0.587853&depth_1-utm_source=distribute.pc_relevant_t0.587853'>
				<div class="desc ellipsis-online ellipsis-online-1">现在经常会在网上看到说<em>Java</em>饱和了，专科找不到工作，不是科班找不到工作之类的话。作为已经成功转行的我，现在明白了一个道理：那些顺利转行成功的，不会去网上说自己转行有多么容易；但是那些转行不成功的，就会到网上宣传行业饱和了，专科找不到工作。现在学的人确实越来越多了，但是学的好，达到公司招聘标准的却没有几个。这是一个技术行业，最终能不能找到工作，找到什么样的工作主要还是看技术学的怎么样，学历，专业对口只是一个人的加分项，如果不是进大公司，只是选择一些中小公司的话，公司主要看重的还是这个人的实际</div>
			</a>
		</div>
	</div>
</div>
                </div>
            <div class="second-recommend-box recommend-box">
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/WantFlyDaCheng/article/details/100078235"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-1.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"1","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/WantFlyDaCheng/article/details/100078235"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/WantFlyDaCheng/article/details/100078235" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-1.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"1","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/WantFlyDaCheng/article/details/100078235"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-1.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-1.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1">我为什么建议大家一定要考研？</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/WantFlyDaCheng" target="_blank"><span class="blog-title">WantFlyDaCheng的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">11-28</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					395
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/WantFlyDaCheng/article/details/100078235" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-1.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"1","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/WantFlyDaCheng/article/details/100078235"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-1.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-1.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1">选专业，选行业，选考研/就业大学一共有 3 次比较重大的选择，而这三次选择，都有可能决定你今后的发展与未来，我亲身经历过这其中的每一次选择，对我都影响巨大，至今恍如隔日选...</div>
			</a>
		</div>
	</div>
</div>
            </div>
<a id="commentBox" name="commentBox"></a>
<div class="comment-box">
	<div class="comment-edit-box d-flex">
		<a id="commentsedit"></a>
		<div class="user-img">
			<a href="javascript:void(0);" >
				<img class="show_loginbox" src="https://g.csdnimg.cn/static/user-img/anonymous-User-img.png">
			</a>
		</div>
		<form id="commentform">
			<img class="comment-sofa-flag" src="https://csdnimg.cn/release/blogv2/dist/pc/img/commentFlag@2x.png">
      <textarea class="comment-content" name="comment_content" id="comment_content" placeholder="优质评论可以帮助作者获得更高权重" maxlength="1000"></textarea>
			<div class="comment-emoticon"><img class="comment-emoticon-img" data-url="https://csdnimg.cn/release/blogv2/dist/pc/img/" src="https://csdnimg.cn/release/blogv2/dist/pc/img/emoticon.png" alt="表情包"></div> 
      <span class="comment-emoticon-tip">插入表情</span>
      <div class="comment-emoticon-box">
        <div class="comment-emoticon-img-box"></div>
			</div>
      <div class="opt-box">
				<div id="ubbtools" class="add_code">
					<a href="#insertcode" code="code" target="_self"><i class="icon iconfont icon-daima"></i></a>
				</div>
				<input type="hidden" id="comment_replyId" name="comment_replyId">
				<input type="hidden" id="article_id" name="article_id" value="119947254">
				<input type="hidden" id="comment_userId" name="comment_userId" value="">
				<input type="hidden" id="commentId" name="commentId" value="">
				<div class="dropdown" id="myDrap">
					<a class="dropdown-face d-flex align-items-center" data-toggle="dropdown" role="button"
						aria-haspopup="true" aria-expanded="false">
						<div class="txt-selected text-truncate">添加代码片</div>
						<svg class="icon d-block" width="200px" height="100.00px" viewBox="0 0 2048 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path  d="M597.33333292 298.666667h853.333334L1023.99999992 725.333333 597.33333292 298.666667z"  /></svg>
					</a>
					<ul class="dropdown-menu" id="commentCode" aria-labelledby="drop4">
						<li><a data-code="html">HTML/XML</a></li>
						<li><a data-code="objc">objective-c</a></li>
						<li><a data-code="ruby">Ruby</a></li>
						<li><a data-code="php">PHP</a></li>
						<li><a data-code="csharp">C</a></li>
						<li><a data-code="cpp">C++</a></li>
						<li><a data-code="javascript">JavaScript</a></li>
						<li><a data-code="python">Python</a></li>
						<li><a data-code="java">Java</a></li>
						<li><a data-code="css">CSS</a></li>
						<li><a data-code="sql">SQL</a></li>
						<li><a data-code="plain">其它</a></li>
					</ul>
				</div>
				<div class="right-box" id="rightBox" data-type="2">
							<span id="tip_comment" class="tip">还能输入<em>1000</em>个字符</span>
							<a data-report-click='{"mod":"1582594662_003","spm":"1001.2101.3001.4227","ab":"new"}'><input type="submit"
									class="btn btn-sm btn-comment" value="发表评论"></a>
				</div>
			</div>
		</form>
		<input type="button" class="bt-comment-show" value="评论">
	</div>
	<div class="comment-list-container">
		<a id="comments"></a>
		<div class="comment-list-box">
		</div>
		<div id="commentPage" class="pagination-box d-none"></div>
		<div class="opt-box text-center">
			<div class="btn btn-sm btn-link-blue" id="btnMoreComment"></div>
		</div>
	</div>
</div>            <div class="recommend-box insert-baidu-box">
                <div class="recommend-item-box clearfix" style="display:none"></div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/yusiguyuan/article/details/49765575"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-2.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"2","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/yusiguyuan/article/details/49765575"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/yusiguyuan/article/details/49765575" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-2.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"2","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/yusiguyuan/article/details/49765575"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-2.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-2.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1">我为什么那么喜欢呆在实验室，因为我知道我错过就再也没有机会</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/yusiguyuan" target="_blank"><span class="blog-title">鱼思故渊的专栏</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">11-10</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					1万+
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/yusiguyuan/article/details/49765575" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-2.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"2","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/yusiguyuan/article/details/49765575"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-2.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-2.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1">原以为属于自己的求职季会非常残酷、异常辛苦，想一想去年毕业的师兄师姐，为了一个满意的工作整天跑场去笔试<em>面试</em>。原以为在这场没有硝烟的战争中会被虐的很惨，原来都是虚惊一场，之前一切的假想都是存在，简历还没来得及好好准备就那样稀里糊涂的签了。
找工作之前，或者说在研究生阶段，每次遇到细致的面经，都忍不住扫上一眼。时至今日，学校的秋季招聘也告一段落，闲来无事，也想和大家分享一下个人找工作的些许经历和准备</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://cxuan.blog.csdn.net/article/details/117103962"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-3.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"3","strategy":"2~default~CTRLIST~default","dest":"https://cxuan.blog.csdn.net/article/details/117103962"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://cxuan.blog.csdn.net/article/details/117103962" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-3.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"3","strategy":"2~default~CTRLIST~default","dest":"https://cxuan.blog.csdn.net/article/details/117103962"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-3.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-3.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1">一位考研<em>学长</em>的走心经验分享</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/qq_36894974" target="_blank"><span class="blog-title">程序员cxuan的个人主页</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">05-21</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					3773
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://cxuan.blog.csdn.net/article/details/117103962" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-3.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"3","strategy":"2~default~CTRLIST~default","dest":"https://cxuan.blog.csdn.net/article/details/117103962"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-3.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-3.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1">你考得上么，就算你考上了，你能毕业么？你读三年研究生，和人家三年工作经验的能比么？大学时单片机老师当着全专业同学的面问我。我这个人记性比较好，时隔四年，研究生即将毕业，可还是可以清楚的把这位老师的话复现。以前我不知道这个问题的答案，但是现在我可以自信的回答这个问题：能毕业。
在力所能及的情况下尽可能的提高学历
这里分享一下本菜鸡的考研之旅。篇幅较长。
大学之前，并未想过大学结束之后是怎么样，只是整天开心的像个小傻子，尽情的享受美好的大学时光，大三临近结束的时候，大家都在讨论以后的安排，考研，实习，考公，创业</div>
			</a>
		</div>
	</div>
</div>
		<dl id="recommend-item-box-tow" class="recommend-item-box type_blog clearfix">
			
		</dl>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/dsklfjal123/article/details/11990261"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-4.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"4","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/dsklfjal123/article/details/11990261"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/dsklfjal123/article/details/11990261" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-4.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"4","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/dsklfjal123/article/details/11990261"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-4.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-4.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1">我的中科院之旅</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/dsklfjal123" target="_blank"><span class="blog-title">嘻嘻哈哈在成长</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">09-24</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					1787
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/dsklfjal123/article/details/11990261" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-4.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"4","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/dsklfjal123/article/details/11990261"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-4.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-4.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1">从6月份信工所第一次<em>面试</em>，到现在9月底了，我这三个月经历了大多数保外校研所经历的事情吧，虽然最终还是因为本校外推资格突然减少让我只能在计算所楼下写下这些回忆。给学弟学妹们看看，也当是我玩了这么久的留念啊。
------------------------------------第一部分&nbsp;
所谓经验之谈-------------------------------
想想看总结下我觉得：保研路=</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://fantianzuo.blog.csdn.net/article/details/115998048"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~essearch~vector-5.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"5","strategy":"2~default~essearch~vector","dest":"https://fantianzuo.blog.csdn.net/article/details/115998048"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://fantianzuo.blog.csdn.net/article/details/115998048" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~essearch~vector-5.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"5","strategy":"2~default~essearch~vector","dest":"https://fantianzuo.blog.csdn.net/article/details/115998048"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-5.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-5.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1"><em>当年</em>，学姐把<em>这份</em><em>Java</em>总结给我，让我在<em>22k</em>的<em>校招</em>王者局乱杀</div>
					<div class="tag">热门推荐</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/hebtu666" target="_blank"><span class="blog-title">hebtu666</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">04-22</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					3万+
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://fantianzuo.blog.csdn.net/article/details/115998048" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~essearch~vector-5.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"5","strategy":"2~default~essearch~vector","dest":"https://fantianzuo.blog.csdn.net/article/details/115998048"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-5.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-5.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1">可以说，学姐给我的<em>这份</em>文档真的把我的知识查漏补缺，<em>面试</em>问到了好多，值得收藏。</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/h8y0bDJVUkwE1LboZlE/article/details/91073793"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~essearch~vector-6.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"6","strategy":"2~default~essearch~vector","dest":"https://blog.csdn.net/h8y0bDJVUkwE1LboZlE/article/details/91073793"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/h8y0bDJVUkwE1LboZlE/article/details/91073793" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~essearch~vector-6.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"6","strategy":"2~default~essearch~vector","dest":"https://blog.csdn.net/h8y0bDJVUkwE1LboZlE/article/details/91073793"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-6.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-6.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1"><em>二本</em>的我怎么<em>拿到</em>的字节跳动offer</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/h8y0bDJVUkwE1LboZlE" target="_blank"><span class="blog-title">爱编程</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">06-06</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					1万+
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/h8y0bDJVUkwE1LboZlE/article/details/91073793" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~essearch~vector-6.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"6","strategy":"2~default~essearch~vector","dest":"https://blog.csdn.net/h8y0bDJVUkwE1LboZlE/article/details/91073793"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-6.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-6.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1">作者：Thebloodelves链接：https://www.jianshu.com/p/755d499535d0前言大佬请自觉绕过，我只是站在一个菜鸟的角度来写这个文章...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/xqnode/article/details/112299288"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~essearch~vector-7.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"7","strategy":"2~default~essearch~vector","dest":"https://blog.csdn.net/xqnode/article/details/112299288"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/xqnode/article/details/112299288" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~essearch~vector-7.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"7","strategy":"2~default~essearch~vector","dest":"https://blog.csdn.net/xqnode/article/details/112299288"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-7.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-7.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1">经验：一个普通的<em>二本</em>学生如何<em>拿到</em>大厂的offer？</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/xqnode" target="_blank"><span class="blog-title">程序员青戈</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">01-06</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					4844
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/xqnode/article/details/112299288" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~essearch~vector-7.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"7","strategy":"2~default~essearch~vector","dest":"https://blog.csdn.net/xqnode/article/details/112299288"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-7.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-7.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1">黑马逆袭之路</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://fantianzuo.blog.csdn.net/article/details/116449776"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~essearch~vector-8.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"8","strategy":"2~default~essearch~vector","dest":"https://fantianzuo.blog.csdn.net/article/details/116449776"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://fantianzuo.blog.csdn.net/article/details/116449776" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~essearch~vector-8.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"8","strategy":"2~default~essearch~vector","dest":"https://fantianzuo.blog.csdn.net/article/details/116449776"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-8.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-8.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1"><em>当年</em>，兔子学姐靠这个<em>面试</em>小抄拿了个<em>22k</em></div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/hebtu666" target="_blank"><span class="blog-title">hebtu666</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">05-06</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					1万+
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://fantianzuo.blog.csdn.net/article/details/116449776" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~essearch~vector-8.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"8","strategy":"2~default~essearch~vector","dest":"https://fantianzuo.blog.csdn.net/article/details/116449776"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-8.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-8.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1">都是当时准备<em>面试</em>总结的，学生<em>面试</em>基本不会跑出这个范围，懂行的应该能看出来。</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/coderising/article/details/117308979"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~essearch~vector-9.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"9","strategy":"2~default~essearch~vector","dest":"https://blog.csdn.net/coderising/article/details/117308979"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/coderising/article/details/117308979" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~essearch~vector-9.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"9","strategy":"2~default~essearch~vector","dest":"https://blog.csdn.net/coderising/article/details/117308979"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-9.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-9.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1"><em>校招</em>进腾讯，<em>二本</em>没戏了？</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/coderising" target="_blank"><span class="blog-title">码农翻身</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">05-26</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					597
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/coderising/article/details/117308979" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~essearch~vector-9.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"9","strategy":"2~default~essearch~vector","dest":"https://blog.csdn.net/coderising/article/details/117308979"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-9.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-9.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1">熟悉我的朋友应该知道，我对自己的介绍一直是：普通<em>二本</em>毕业，本科进腾讯，去过外企，肝过头条，目前回腾讯窝着。我经常在后台收到小伙伴的私信：&ldquo;你真的是<em>二本</em>毕业吗？进腾讯有什么秘诀？&rdquo;&ldquo;我不是9...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/xuan_xinya/article/details/8749491"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-10.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"10","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/xuan_xinya/article/details/8749491"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/xuan_xinya/article/details/8749491" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-10.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"10","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/xuan_xinya/article/details/8749491"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-10.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-10.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1">我是一只 IT小小鸟</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/xuan_xinya" target="_blank"><span class="blog-title">西_北</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">04-02</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					1万+
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/xuan_xinya/article/details/8749491" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-10.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"10","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/xuan_xinya/article/details/8749491"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-10.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-10.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1">我是一只 IT小小鸟&nbsp;
作者序&nbsp;
2009 年 3 月的某个晚上，我跟侯磊同学在万柳宿舍卧谈。我们聊起初来北
大软件学院时的志向与苦闷，我们梳理影响自己的人和事，说各自的实习感受和
找工作的风风雨雨，说学校的教育制度和各个公司的文化。一夜痛快淋漓地说下
来，我们不由总结出，要是研一或更早，有师兄师姐能够这么提醒我们，这一路
我们可能就会走得更从容、更自觉。&nbsp;
现在我们都成师兄师姐了，</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/xiangguangde/article/details/8833859"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-11.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"11","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/xiangguangde/article/details/8833859"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/xiangguangde/article/details/8833859" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-11.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"11","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/xiangguangde/article/details/8833859"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-11.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-11.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1">理工校赛决赛赛后总结</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/xiangguangde" target="_blank"><span class="blog-title">xiangguangde的专栏</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">04-22</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					658
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/xiangguangde/article/details/8833859" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-11.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"11","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/xiangguangde/article/details/8833859"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-11.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-11.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1">理工校赛专业组比赛赛后总结
&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;不知不觉来理工学习已经有两个多星期了，虽然我们不属于本校的学生，但是我们丝毫没有感觉到一点点排外的意思，仿佛都是自己一家人一样平时拿我们当兄弟看待，不管有什么资料、资讯或者活动之类的都有我们参加的份，包括学校组织的有&ldquo;福利&rdquo;的活动或者比赛，这不，昨天我们又参加了一场真正的模拟赛。说他是真正的模拟赛不单单是因为组织的形势是正规的，地点、时间是正规的，</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://bigsai.blog.csdn.net/article/details/118719466"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-12.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"12","strategy":"2~default~CTRLIST~default","dest":"https://bigsai.blog.csdn.net/article/details/118719466"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://bigsai.blog.csdn.net/article/details/118719466" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-12.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"12","strategy":"2~default~CTRLIST~default","dest":"https://bigsai.blog.csdn.net/article/details/118719466"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-12.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-12.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1">程序员的四个暑假：从打工开始到打工结束</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/qq_40693171" target="_blank"><span class="blog-title">bigsai</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">07-14</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					6764
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://bigsai.blog.csdn.net/article/details/118719466" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-12.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"12","strategy":"2~default~CTRLIST~default","dest":"https://bigsai.blog.csdn.net/article/details/118719466"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-12.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-12.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1">暑假结束，逝去的四个暑假
大家好，我是bigsai。
上周四回家，周五周六周日在家呆了三天，今天已经身处高铁回学校了，开启暑期打工人生活。
暑假，对于很多人来说是个非常好的机会，两个月的时间相对自由，没有课程、考试压力，如果认真利用起来可以学到很多内容。
自从离开高中，其实还有一个高三毕业的暑假，那个暑假大部分人可能玩了一暑假或者是做零工挣钱，反正是不会学习的，我当时的话也是在可成科技(电子厂)流水线上干了两个月夜班，每天12小时最后挣得钱一部分买了手机、一部分留作部分生活费。
有很多学弟妹问我的暑假以前是</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/weixin_34380948/article/details/91366756"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-13.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"13","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/weixin_34380948/article/details/91366756"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/weixin_34380948/article/details/91366756" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-13.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"13","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/weixin_34380948/article/details/91366756"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-13.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-13.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1">2016 总结：一个应届生的互联网名企逐梦记</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/weixin_34380948" target="_blank"><span class="blog-title">weixin_34380948的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">12-30</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					73
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/weixin_34380948/article/details/91366756" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-13.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"13","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/weixin_34380948/article/details/91366756"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-13.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-13.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1">2016 年会是我人生的转折点，即将找工作，来一点正能量给那些和我一样心怀梦想的朋友吧。
这一年，我大概做了如下几件事：

敲了超过 7 万行代码
写了约 80 篇技术博客
第一次说走就走的旅行
第一次买了超过自己消费能力的奢侈品

我的个人网站上这一年的纪要 brianway.github.io/about/
2016总结-纪要
觉悟的寒假
2015 年过得很窝囊，虽说轻松毕业保研，本校本专业...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/sinat_37903468/article/details/110386589"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-14.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"14","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/sinat_37903468/article/details/110386589"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/sinat_37903468/article/details/110386589" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-14.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"14","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/sinat_37903468/article/details/110386589"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-14.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-14.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1">20多年的岁月里一路走来满是辜负与遗憾，从双非到阿里SP，收到offer的那天我哭惨了</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/sinat_37903468" target="_blank"><span class="blog-title">javajavajava</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">11-30</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					1625
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/sinat_37903468/article/details/110386589" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-14.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"14","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/sinat_37903468/article/details/110386589"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-14.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-14.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1">前言

2021届的秋招基本尾声，总的来说收获也算是匹配的到自己的付出。马上就要告别学生时代，接收社会的洗礼，但是感觉这几年的学习生涯依然历历在目。恰逢有朋友建议我可以整理一下从入行以来到秋招结束的学习路线与学习方法。转念一想也对，所以写下此文，也算是对自己的一个总结和交代吧。如果可以帮助到更多人，那自然是更好。对于秋招这个事儿，我已经发过两篇文章，所以也就不再赘述同样的内容

这篇文章主要目的是自己的一些心得分享，包括但不限于：

自己对工作选择的一些感想
	自己准备秋招时为了弥补学校劣势的一些策略
	对</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://alexanderchen.blog.csdn.net/article/details/106126018"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~essearch~vector-15.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"15","strategy":"2~default~essearch~vector","dest":"https://alexanderchen.blog.csdn.net/article/details/106126018"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://alexanderchen.blog.csdn.net/article/details/106126018" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~essearch~vector-15.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"15","strategy":"2~default~essearch~vector","dest":"https://alexanderchen.blog.csdn.net/article/details/106126018"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-15.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-15.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1">因为<em>这份</em>简历，我<em>拿到</em>了阿里的offer！</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/JAck_chen0309" target="_blank"><span class="blog-title">微信公众号：云璈公子</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">05-14</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					9141
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://alexanderchen.blog.csdn.net/article/details/106126018" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~essearch~vector-15.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"15","strategy":"2~default~essearch~vector","dest":"https://alexanderchen.blog.csdn.net/article/details/106126018"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-15.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-15.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1">成功<em>拿到</em>阿里的offer，我总结了这几个简历书写的经验技巧！</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/hugo233/article/details/114377734"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~essearch~vector-16.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"16","strategy":"2~default~essearch~vector","dest":"https://blog.csdn.net/hugo233/article/details/114377734"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/hugo233/article/details/114377734" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~essearch~vector-16.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"16","strategy":"2~default~essearch~vector","dest":"https://blog.csdn.net/hugo233/article/details/114377734"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-16.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-16.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1">靠着<em>这份</em>280页《前端<em>校招</em><em>面试</em>真题解析大全》，我<em>拿到</em>了阿里的offer</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/hugo233" target="_blank"><span class="blog-title">hugo233的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">03-04</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					268
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/hugo233/article/details/114377734" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~essearch~vector-16.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"16","strategy":"2~default~essearch~vector","dest":"https://blog.csdn.net/hugo233/article/details/114377734"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-16.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-16.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1">楼主前端方向，是在去年参加的春招，从牛客网上收获了很多经验贴和面经，在春招准备和<em>面试</em>过程中，收获了不少同学的帮助和鼓励。
最终运气比较好，<em>拿到</em>阿里、美团、OPPO、360和有赞的意向书，<em>拿到</em>阿里意向书以后便没有参加其他公司的<em>面试</em>了，现在把之前总结的春招经验分享出来，希望能够帮助到其他朋友～
前端知识点汇总
前端知识点是我在准备春招过程中，看书和经验贴中总结到的一些知识点，不仅<em>面试</em>中经常问到，同时对于自己未来的工作和学习也很重要，也欢迎大家一起补充～
一、<em>Java</em>Script

原始值和引用值类型及区别
判.</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/xgf415/article/details/78438837"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~essearch~vector-17.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"17","strategy":"2~default~essearch~vector","dest":"https://blog.csdn.net/xgf415/article/details/78438837"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/xgf415/article/details/78438837" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~essearch~vector-17.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"17","strategy":"2~default~essearch~vector","dest":"https://blog.csdn.net/xgf415/article/details/78438837"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-17.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-17.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1">我的 2017 <em>校招</em>总结</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/xgf415" target="_blank"><span class="blog-title">summer</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">11-04</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					2201
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/xgf415/article/details/78438837" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~essearch~vector-17.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"17","strategy":"2~default~essearch~vector","dest":"https://blog.csdn.net/xgf415/article/details/78438837"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-17.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-17.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1">10月13号在去<em>面试</em>旷视的路上，陆续收到南京841所、好未来和中信信用卡的录用通知，再加上之前美团的offer，算是结束秋招了，后面还尝试了一些独角兽公司，无果。总的来说求职过程还算比较顺利，对于自动化半路出家IT的我来说，已经满意了（应该也找不到更好的了）。虽然在十一之前我还没收到一个正式秋招offer（除了海康实习转正），所以要相信只要准备好了，offer总会来的。
关于内推
以我在海康实</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/xsgjly2826/article/details/100517550"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~essearch~vector-18.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"18","strategy":"2~default~essearch~vector","dest":"https://blog.csdn.net/xsgjly2826/article/details/100517550"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/xsgjly2826/article/details/100517550" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~essearch~vector-18.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"18","strategy":"2~default~essearch~vector","dest":"https://blog.csdn.net/xsgjly2826/article/details/100517550"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-18.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-18.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1">普通<em>二本</em>院校计算机专业大学心得</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/xsgjly2826" target="_blank"><span class="blog-title">Ludy</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">09-03</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					3767
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/xsgjly2826/article/details/100517550" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~essearch~vector-18.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"18","strategy":"2~default~essearch~vector","dest":"https://blog.csdn.net/xsgjly2826/article/details/100517550"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-18.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-18.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1">前言
​	    2019年9月2日，步入大四的第一天，这第一天有分感慨，却又不知道如何表达。马上就要步入社会了，身处普通<em>二本</em>院校（&ldquo;吕梁学院&rdquo;）计算机专业的我却对于前途未来并不担心，我这几年的努力，我自己知道。我这个人比较&hellip;比较执着，对！执着，更加形象。我想要的，都会通过自己的努力得到。而我现在想的，是想给学校留下点什么，想给下一个像我这样的人留下点什么。
步入大学的迷茫
​		刚步入大学，没有...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/m0_37907797/article/details/119178036"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~essearch~vector-19.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"19","strategy":"2~default~essearch~vector","dest":"https://blog.csdn.net/m0_37907797/article/details/119178036"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/m0_37907797/article/details/119178036" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~essearch~vector-19.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"19","strategy":"2~default~essearch~vector","dest":"https://blog.csdn.net/m0_37907797/article/details/119178036"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-19.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-19.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1"><em>二本</em>，终于<em>拿到</em>腾讯阿里offer了，翻牌！</div>
					<div class="tag">最新发布</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/m0_37907797" target="_blank"><span class="blog-title">帅地</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">07-28</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					3537
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/m0_37907797/article/details/119178036" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~essearch~vector-19.no_search_link\",\"dist_request_id\":\"1631862760685_73476\"}","dist_request_id":"1631862760685_73476","ab_strategy":"ctrlist","index":"19","strategy":"2~default~essearch~vector","dest":"https://blog.csdn.net/m0_37907797/article/details/119178036"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-19.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7Eessearch%7Evector-19.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1">这是帅地让一位读者写的一份学习经历，这位读者，算是和帅地关系还不错的读者吧，他大一的时候就加了我微信了，当时还是经常骚扰我的，问这问那，甚至让我直接给他的算法题找 bug。。。。。但是，我看他挺真诚，并且每次都给我的朋友圈点赞，我也就每次都耐心回复他了（实不相瞒，经常朋友圈点赞还是有点用，，）

注意，当时帅地还在上学，并没有那么忙，不过现在帅地太忙了，这种问题基本不回复哈。

不夸张的说，我觉得，我还是给了他挺大的影响的，我一直跟他说，不需要按照学校的来，因为有些学校的学习气氛确实不好，编程这玩意，自学就</div>
			</a>
		</div>
	</div>
</div>
            </div>
            <div class="template-box">
                <span>©️2020 CSDN</span>
                <span>皮肤主题: 技术黑板</span>
                <span> 设计师:CSDN官方博客</span>
                <span>
                    <a href="https://blog.csdn.net/" class="back-home c-blue c-blue-hover c-blue-focus">返回首页</a>
                </span>
            </div>
<div class="blog-footer-bottom" style="margin-top:10px;"></div>
<script src="https://g.csdnimg.cn/common/csdn-footer/csdn-footer.js" data-isfootertrack="false" type="text/javascript"></script>
<script type="text/javascript">
    window.csdn.csdnFooter.options = {
        el: '.blog-footer-bottom',
        type: 2
    }
</script>        </main>
<aside class="blog_container_aside">
	<div id="asideProfile" class="aside-box">
    <div class="profile-intro d-flex">
        <div class="avatar-box d-flex justify-content-center flex-column">
            <a href="https://blog.csdn.net/qq_35620342" data-report-click='{"mod":"popu_379","spm":"1001.2101.3001.4121","dest":"https://blog.csdn.net/qq_35620342","ab":"new"}'>
                <img src="https://profile.csdnimg.cn/B/0/A/3_qq_35620342" class="avatar_pic">
            </a>
        </div>
        <div class="user-info d-flex flex-column profile-intro-name-box">
            <div class="profile-intro-name-boxTop">
                <a href="https://blog.csdn.net/qq_35620342" class="" id="uid" title="Java程序鱼" data-report-click='{"mod":"popu_379","spm":"1001.2101.3001.4122","dest":"https://blog.csdn.net/qq_35620342","ab":"new"}'>
                    <span class="name " username="qq_35620342">Java程序鱼</span>
                </a>
                <span>
                </span>
                <span class="flag expert-blog">
                <span class="bubble">CSDN认证博客专家</span>
                </span>
                <span class="flag company-blog">
                <span class="bubble">CSDN认证企业博客</span>
                </span>
            </div>
            <div class="profile-intro-name-boxFooter">
                <span class="personal-home-page personal-home-years">码龄5年</span>
                    <span class="personal-home-page">
                    <a class="personal-home-certification" href="https://i.csdn.net/#/uc/profile?utm_source=14998968" target="_blank" title="Java领域新星创作者">
                    <img src="https://img-home.csdnimg.cn/images/20210412060958.png" alt="">
                    Java领域新星创作者
                    </a>
                    </span>
            </div>
        </div>
    </div>
    <div class="data-info d-flex item-tiling">
        <dl class="text-center" title="43">
            <a href="https://blog.csdn.net/qq_35620342" data-report-click='{"mod":"1598321000_001","spm":"1001.2101.3001.4310"}' data-report-query="t=1">  
                <dt><span class="count">43</span></dt>
                <dd class="font">原创</dd>
            </a>
        </dl>
        <dl class="text-center" data-report-click='{"mod":"1598321000_002","spm":"1001.2101.3001.4311"}' title="26">
            <a href="https://blog.csdn.net/rank/list/weekly" target="_blank">
                <dt><span class="count">26</span></dt>
                <dd class="font">周排名</dd>
            </a>
        </dl>
        <dl class="text-center" title="8069">
            <a href="https://blog.csdn.net/rank/list/total" data-report-click='{"mod":"1598321000_003","spm":"1001.2101.3001.4312"}' target="_blank">
                <dt><span class="count">8069</span></dt>
                <dd class="font">总排名</dd>
            </a>
        </dl>
        <dl class="text-center" style="min-width:58px" title="376572">  
            <dt><span class="count">37万+</span></dt>
            <dd>访问</dd>
        </dl>
        <dl class="text-center" title="5级,点击查看等级说明">
            <dt><a href="https://blog.csdn.net/blogdevteam/article/details/103478461" target="_blank">
                <img class="level" src="https://csdnimg.cn/identity/blog5.png">
            </a>
            </dt>
            <dd>等级</dd>
        </dl>
    </div>
    <div class="item-rank"></div>
    <div class="data-info d-flex item-tiling">
        <dl class="text-center" title="3375">
            <dt><span class="count">3375</span></dt>
            <dd>积分</dd>
        </dl>
         <dl class="text-center" id="fanBox" title="7020">
            <dt><span class="count" id="fan">7020</span></dt>
            <dd>粉丝</dd>
        </dl>
        <dl class="text-center" title="911">
            <dt><span class="count">911</span></dt>
            <dd>获赞</dd>
        </dl>
        <dl class="text-center" title="793">
            <dt><span class="count">793</span></dt>
            <dd>评论</dd>
        </dl>
        <dl class="text-center" title="2474">
            <dt><span class="count">2474</span></dt>
            <dd>收藏</dd>
        </dl>
    </div>
    <div class="aside-box-footer" data-report-view='{"spm":"3001.4296"}'>
        <div class="badge-box d-flex">
            <div class="badge d-flex">
                <div class="icon-badge" title="签到新秀">
                    <div class="mouse-box">
                        <img class="medal-img" data-report-click='{"spm":"3001.4296"}' src="https://csdnimg.cn/medal/qiandao5@240.png" alt="签到新秀">
                    </div>
                </div>
                <div class="icon-badge" title="新秀勋章">
                    <div class="mouse-box">
                        <img class="medal-img" data-report-click='{"spm":"3001.4296"}' src="https://csdnimg.cn/medal/xinxiu@240.png" alt="新秀勋章">
                    </div>
                </div>
                <div class="icon-badge" title="持之以恒">
                    <div class="mouse-box">
                        <img class="medal-img" data-report-click='{"spm":"3001.4296"}' src="https://csdnimg.cn/medal/chizhiyiheng@240.png" alt="持之以恒">
                    </div>
                </div>
                <div class="icon-badge" title="勤写标兵Lv4">
                    <div class="mouse-box">
                        <img class="medal-img" data-report-click='{"spm":"3001.4296"}' src="https://csdnimg.cn/medal/qixiebiaobing4@240.png" alt="勤写标兵Lv4">
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="profile-intro-name-boxOpration">
        <div class="opt-letter-watch-box">
        <a class="bt-button personal-letter" href="https://im.csdn.net/chat/qq_35620342" target="_blank" rel="noopener">私信</a>
        </div>
        <div class="opt-letter-watch-box"> 
            <a class="personal-watch bt-button" id="btnAttent" >关注</a>  
        </div>
    </div>
</div>
<div id="asideSearchArticle" class="aside-box">
	<div class="aside-content search-comter">
    <div class="aside-search aside-search-blog">         
        <input type="text" class="input-serch-blog" name="" autocomplete="off" value="" id="search-blog-words" placeholder="搜博主文章">
        <a class="btn-search-blog">
                    <img src="//csdnimg.cn/cdn/content-toolbar/csdn-sou.png?v=1587021042">
        </a>
    </div>
    </div>
</div>


<div id="asideHotArticle" class="aside-box">
	<h3 class="aside-title">热门文章</h3>
	<div class="aside-content">
		<ul class="hotArticle-list">
			<li>
				<a href="https://blog.csdn.net/qq_35620342/article/details/119636436" target="_blank"  data-report-click='{"mod":"popu_541","spm":"1001.2101.3001.4139","dest":"https://blog.csdn.net/qq_35620342/article/details/119636436","ab":"new"}'>
				我把面试问烂了的⭐Java基础篇⭐总结了一下（带答案，万字总结，精心打磨，建议收藏）
					<img src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					<span class="read">14101</span>
                </a>
			</li>
			<li>
				<a href="https://blog.csdn.net/qq_35620342/article/details/119930887" target="_blank"  data-report-click='{"mod":"popu_541","spm":"1001.2101.3001.4139","dest":"https://blog.csdn.net/qq_35620342/article/details/119930887","ab":"new"}'>
				我把面试问烂了的⭐MySQL面试题⭐总结了一下（带答案，万字总结，精心打磨，建议收藏）
					<img src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					<span class="read">12286</span>
                </a>
			</li>
			<li>
				<a href="https://blog.csdn.net/qq_35620342/article/details/119947254" target="_blank"  data-report-click='{"mod":"popu_541","spm":"1001.2101.3001.4139","dest":"https://blog.csdn.net/qq_35620342/article/details/119947254","ab":"new"}'>
				当年学长把这份Java总结给我，让我普通二本校招拿到22K
					<img src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					<span class="read">11330</span>
                </a>
			</li>
			<li>
				<a href="https://blog.csdn.net/qq_35620342/article/details/119956512" target="_blank"  data-report-click='{"mod":"popu_541","spm":"1001.2101.3001.4139","dest":"https://blog.csdn.net/qq_35620342/article/details/119956512","ab":"new"}'>
				我把面试问烂了的⭐Spring面试题⭐总结了一下（带答案，万字总结，精心打磨，建议收藏）
					<img src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					<span class="read">10566</span>
                </a>
			</li>
			<li>
				<a href="https://blog.csdn.net/qq_35620342/article/details/119781708" target="_blank"  data-report-click='{"mod":"popu_541","spm":"1001.2101.3001.4139","dest":"https://blog.csdn.net/qq_35620342/article/details/119781708","ab":"new"}'>
				大学四年，这个Java学习路线，让我进了大厂
					<img src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					<span class="read">10025</span>
                </a>
			</li>
		</ul>
	</div>
</div>
<div id="asideCategory" class="aside-box ">
    <h3 class="aside-title">分类专栏</h3>
    <div class="aside-content">
        <ul>
            <li class="">
                <a class="clearfix" target="_blank" href="https://blog.csdn.net/qq_35620342/category_7125081.html" data-report-click='{"mod":"popu_537","spm":"1001.2101.3001.4137","strategy":"pc付费专栏左侧入口","dest":"https://blog.csdn.net/qq_35620342/category_7125081.html","ab":"new"}'>
                    <img src="https://img-blog.csdnimg.cn/20210907091359328.png?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="" onerror="this.src='https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64'">
                    <span class="title oneline">
                        <span class="text">MySQL精品专栏</span>
                    </span>
                    <span class="count float-right">2篇</span>
                </a>
            </li>
            <li class="">
                <a class="clearfix" target="_blank" href="https://blog.csdn.net/qq_35620342/category_11278274.html" data-report-click='{"mod":"popu_537","spm":"1001.2101.3001.4137","strategy":"pc付费专栏左侧入口","dest":"https://blog.csdn.net/qq_35620342/category_11278274.html","ab":"new"}'>
                    <img src="https://img-blog.csdnimg.cn/20210829110515682.png?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="" onerror="this.src='https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64'">
                    <span class="title oneline">
                        <span class="text">面试题专栏</span>
                    </span>
                    <span class="count float-right">20篇</span>
                </a>
            </li>
            <li class="">
                <a class="clearfix" target="_blank" href="https://blog.csdn.net/qq_35620342/category_11316780.html" data-report-click='{"mod":"popu_537","spm":"1001.2101.3001.4137","strategy":"pc付费专栏左侧入口","dest":"https://blog.csdn.net/qq_35620342/category_11316780.html","ab":"new"}'>
                    <img src="https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="" onerror="this.src='https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64'">
                    <span class="title oneline">
                        <span class="text">面经专栏</span>
                    </span>
                </a>
            </li>
            <li class="">
                <a class="clearfix" target="_blank" href="https://blog.csdn.net/qq_35620342/category_11257165.html" data-report-click='{"mod":"popu_537","spm":"1001.2101.3001.4137","strategy":"pc付费专栏左侧入口","dest":"https://blog.csdn.net/qq_35620342/category_11257165.html","ab":"new"}'>
                    <img src="https://img-blog.csdnimg.cn/20210916171842276.png?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="" onerror="this.src='https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64'">
                    <span class="title oneline">
                        <span class="text">Redis</span>
                    </span>
                    <span class="count float-right">13篇</span>
                </a>
            </li>
            <li class="">
                <a class="clearfix" target="_blank" href="https://blog.csdn.net/qq_35620342/category_11292886.html" data-report-click='{"mod":"popu_537","spm":"1001.2101.3001.4137","strategy":"pc付费专栏左侧入口","dest":"https://blog.csdn.net/qq_35620342/category_11292886.html","ab":"new"}'>
                    <img src="https://img-blog.csdnimg.cn/20210916171953893.png?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="" onerror="this.src='https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64'">
                    <span class="title oneline">
                        <span class="text">MySQL基础</span>
                    </span>
                    <span class="count float-right">5篇</span>
                </a>
            </li>
        </ul>
    </div>
</div>
<div id="asideNewComments" class="aside-box">
    <h3 class="aside-title">最新评论</h3>
    <div class="aside-content">
        <ul class="newcomment-list">
            <li>
                <a class="title text-truncate" target="_blank" href="https://blog.csdn.net/qq_35620342/article/details/120221075#comments_18346826" data-report-click='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://blog.csdn.net/qq_35620342/article/details/120221075#comments_18346826","ab":"new"}' data-report-view='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://blog.csdn.net/qq_35620342/article/details/120221075#comments_18346826","ab":"new"}'>当年这些网站，让我普通二本校招拿到22K</a>
                <p class="comment ellipsis">
                    <a href="https://blog.csdn.net/jiangjunsss" class="user-name" target="_blank">小码哥说测试: </a>
                    <span class="code-comments">6666</span>
                </p>
            </li>
            <li>
                <a class="title text-truncate" target="_blank" href="https://blog.csdn.net/qq_35620342/article/details/119758385#comments_18346825" data-report-click='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://blog.csdn.net/qq_35620342/article/details/119758385#comments_18346825","ab":"new"}' data-report-view='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://blog.csdn.net/qq_35620342/article/details/119758385#comments_18346825","ab":"new"}'>2.Linux上安装MySQL</a>
                <p class="comment ellipsis">
                    <a href="https://blog.csdn.net/LOVEmy134611" class="user-name" target="_blank">盼小辉丶: </a>
                    <span class="code-comments">字里行间散发着知识的香味.</span>
                </p>
            </li>
            <li>
                <a class="title text-truncate" target="_blank" href="https://blog.csdn.net/qq_35620342/article/details/119947254#comments_18341889" data-report-click='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://blog.csdn.net/qq_35620342/article/details/119947254#comments_18341889","ab":"new"}' data-report-view='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://blog.csdn.net/qq_35620342/article/details/119947254#comments_18341889","ab":"new"}'>当年学长把这份Java总结给我，让我普通二本校招拿到22K</a>
                <p class="comment ellipsis">
                    <a href="https://blog.csdn.net/qq_35620342" class="user-name" target="_blank">Java程序鱼: </a>
                    <span class="code-comments">你可以看下大厂校招或者是垂直领域巨头校招，22K是比较一般的水平</span>
                </p>
            </li>
            <li>
                <a class="title text-truncate" target="_blank" href="https://blog.csdn.net/qq_35620342/article/details/119947254#comments_18340111" data-report-click='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://blog.csdn.net/qq_35620342/article/details/119947254#comments_18340111","ab":"new"}' data-report-view='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://blog.csdn.net/qq_35620342/article/details/119947254#comments_18340111","ab":"new"}'>当年学长把这份Java总结给我，让我普通二本校招拿到22K</a>
                <p class="comment ellipsis">
                    <a href="https://blog.csdn.net/applefor_" class="user-name" target="_blank">林夕木木！: </a>
                    <span class="code-comments">真的可以</span>
                </p>
            </li>
            <li>
                <a class="title text-truncate" target="_blank" href="https://blog.csdn.net/qq_35620342/article/details/120221075#comments_18338592" data-report-click='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://blog.csdn.net/qq_35620342/article/details/120221075#comments_18338592","ab":"new"}' data-report-view='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://blog.csdn.net/qq_35620342/article/details/120221075#comments_18338592","ab":"new"}'>当年这些网站，让我普通二本校招拿到22K</a>
                <p class="comment ellipsis">
                    <a href="https://blog.csdn.net/qq_59860806" class="user-name" target="_blank">黒讬: </a>
                    <span class="code-comments">666</span>
                </p>
            </li>
        </ul>
    </div>
</div>
<div id="asideNewNps" class="aside-box">
    <h3 class="aside-title">您愿意向朋友推荐“博客详情页”吗？</h3>
    <div class="aside-content">
        <ul class="newnps-list">
            <li class="newnps-item" data-type="强烈不推荐">
                <div class="newnps-img-box">
                    <img class="newnps-img active" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeel1.png" alt="">
                    <img class="newnps-img default" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeelGrey1.png" alt="">
                </div>
                <div class="newnps-text">强烈不推荐</div>
            </li>
            <li class="newnps-item" data-type="不推荐">
                <div class="newnps-img-box">
                    <img class="newnps-img active" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeel2.png" alt="">
                    <img class="newnps-img default" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeelGrey2.png" alt="">
                </div>
                <div class="newnps-text">不推荐</div>
            </li>
            <li class="newnps-item" data-type="一般般">
                <div class="newnps-img-box">
                    <img class="newnps-img active" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeel3.png" alt="">
                    <img class="newnps-img default" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeelGrey3.png" alt="">
                </div>
                <div class="newnps-text">一般般</div>
            </li>
            <li class="newnps-item" data-type="推荐">
                <div class="newnps-img-box">
                    <img class="newnps-img active" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeel4.png" alt="">
                    <img class="newnps-img default" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeelGrey4.png" alt="">
                </div>
                <div class="newnps-text">推荐</div>
            </li>
            <li class="newnps-item" data-type="强烈推荐">
                <div class="newnps-img-box">
                    <img class="newnps-img active" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeel5.png" alt="">
                    <img class="newnps-img default" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeelGrey5.png" alt="">
                </div>
                <div class="newnps-text">强烈推荐</div>
            </li>
        </ul>
        <div class="newnps-form-box">
        <div class="newnps-form">
            <input type="text" placeholder="请输入建议或反馈后点击提交" class="newnps-input">
            <span class="newnps-btn">提交</span>
        </div>
        </div>
    </div>
</div>
<div id="asideArchive" class="aside-box" style="display:block!important; width:300px;">
    <h3 class="aside-title">最新文章</h3>
    <div class="aside-content">
        <ul class="inf_list clearfix">
            <li class="clearfix">
            <a href="https://blog.csdn.net/qq_35620342/article/details/120221075" target="_blank" data-report-click='{"mod":"popu_382","spm":"1001.2101.3001.4136","dest":"https://blog.csdn.net/qq_35620342/article/details/120221075","ab":"new"}' data-report-view='{"mod":"popu_382","dest":"https://blog.csdn.net/qq_35620342/article/details/120221075","ab":"new"}'>当年这些网站，让我普通二本校招拿到22K</a>
            </li>
            <li class="clearfix">
            <a href="https://blog.csdn.net/qq_35620342/article/details/119977224" target="_blank" data-report-click='{"mod":"popu_382","spm":"1001.2101.3001.4136","dest":"https://blog.csdn.net/qq_35620342/article/details/119977224","ab":"new"}' data-report-view='{"mod":"popu_382","dest":"https://blog.csdn.net/qq_35620342/article/details/119977224","ab":"new"}'>我把面试问烂了的⭐Java并发编程⭐总结了一下（带答案，万字总结，精心打磨，建议收藏）</a>
            </li>
            <li class="clearfix">
            <a href="https://blog.csdn.net/qq_35620342/article/details/120081558" target="_blank" data-report-click='{"mod":"popu_382","spm":"1001.2101.3001.4136","dest":"https://blog.csdn.net/qq_35620342/article/details/120081558","ab":"new"}' data-report-view='{"mod":"popu_382","dest":"https://blog.csdn.net/qq_35620342/article/details/120081558","ab":"new"}'>想进大厂，这些MySQL索引底层知识你必须掌握</a>
            </li>
        </ul>
        <div class="archive-bar"></div>
        <div class="archive-box">
                <div class="archive-title">2021</div> 
                <div class="archive-content">
                    <div class="archive-item">
                        <a href="https://blog.csdn.net/qq_35620342/article/month/2021/09" target="_blank" data-report-click='{"mod":"popu_538","spm":"1001.2101.3001.4138","ab":"new","dest":"https://blog.csdn.net/qq_35620342/article/month/2021/09"}'>
                        <span class="time">09月</span>
                        <span class="count">8篇</span>
                        </a>
                    </div>
                    <div class="archive-item">
                        <a href="https://blog.csdn.net/qq_35620342/article/month/2021/08" target="_blank" data-report-click='{"mod":"popu_538","spm":"1001.2101.3001.4138","ab":"new","dest":"https://blog.csdn.net/qq_35620342/article/month/2021/08"}'>
                        <span class="time">08月</span>
                        <span class="count">35篇</span>
                        </a>
                    </div>
                </div>
        </div>
    </div>
</div>
	<div id="footerRightAds" class="isShowFooterAds">
		<div class="aside-box">
			<div id="kp_box_57" data-pid="57"><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- PC-博客详情页-矩形-左下视窗（自适应） -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-1076724771190722"
     data-ad-slot="1894159733"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script><img class="pre-img-lasy" data-src="https://kunyu.csdn.net/1.png?p=57&a=707&c=0&k=&spm=1001.2101.3001.5001&d=1&t=3&u=e3c36e94eff74360a123c79931a3edee" style="display: block;width: 0px;height: 0px;"></div>
		</div>
	</div>
    <!-- 详情页显示目录 -->
<!--文章目录-->
<div id="asidedirectory" class="aside-box">
    <div class='groupfile' id="directory">
        <h3 class="aside-title">目录</h3>
        <div class="align-items-stretch group_item">
            <div class="pos-box">
            <div class="scroll-box">
                <div class="toc-box"></div>
            </div>
            </div>
        </div>
    </div>
</div>
</aside>
<script>
	$("a.flexible-btn").click(function(){
		$(this).parents('div.aside-box').removeClass('flexible-box');
		$(this).parents("p.text-center").remove();
	})
</script>
<script type="text/javascript"  src="https://g.csdnimg.cn/user-tooltip/2.5/user-tooltip.js"></script>
<script type="text/javascript"  src="https://g.csdnimg.cn/user-medal/1.0.7/user-medal.js"></script>    </div>
<div class="recommend-right  align-items-stretch clearfix" id="rightAside" data-type="recommend">
    <aside class="recommend-right_aside">
        <div id="recommend-right" >
                        <div class='flex-column aside-box groupfile' id="groupfile">
                <div class="groupfile-div">
                <h3 class="aside-title">目录</h3>
                <div class="align-items-stretch group_item">
                    <div class="pos-box">
                        <div class="scroll-box">
                            <div class="toc-box"></div>
                        </div>
                    </div>
                </div>
                </div>
            </div>
                <div id="recommendAdBox">
                    <div id="kp_box_479" data-pid="479"><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- PC-博客详情页-右侧视窗（自适应） -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-1076724771190722"
     data-ad-slot="3484057394"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script><img class="pre-img-lasy" data-src="https://kunyu.csdn.net/1.png?p=479&a=3267&c=0&k=&spm=1001.2101.3001.4834&d=1&t=3&u=c72f91c602ca469696d5330e537b0882" style="display: block;width: 0px;height: 0px;"></div>
                </div>
            <div class='aside-box kind_person d-flex flex-column'>
                    <h3 class="aside-title">分类专栏</h3>
                    <div class="align-items-stretch kindof_item" id="kind_person_column">
                        <div class="aside-content">
                            <ul>
                                <li class="">
                                    <a class="clearfix" target="_blank" href="https://blog.csdn.net/qq_35620342/category_7125081.html" data-report-click='{"mod":"popu_537","spm":"1001.2101.3001.4137","strategy":"pc付费专栏左侧入口","dest":"https://blog.csdn.net/qq_35620342/category_7125081.html","ab":"new"}'>
                                        <img src="https://img-blog.csdnimg.cn/20210907091359328.png?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="" onerror="this.src='https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64'">
                                        <span class="title oneline">
                                            <span class="text">MySQL精品专栏</span>
                                        </span>
                                        <span class="count float-right">2篇</span>
                                    </a>
                                </li>
                                <li class="">
                                    <a class="clearfix" target="_blank" href="https://blog.csdn.net/qq_35620342/category_11278274.html" data-report-click='{"mod":"popu_537","spm":"1001.2101.3001.4137","strategy":"pc付费专栏左侧入口","dest":"https://blog.csdn.net/qq_35620342/category_11278274.html","ab":"new"}'>
                                        <img src="https://img-blog.csdnimg.cn/20210829110515682.png?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="" onerror="this.src='https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64'">
                                        <span class="title oneline">
                                            <span class="text">面试题专栏</span>
                                        </span>
                                        <span class="count float-right">20篇</span>
                                    </a>
                                </li>
                                <li class="">
                                    <a class="clearfix" target="_blank" href="https://blog.csdn.net/qq_35620342/category_11316780.html" data-report-click='{"mod":"popu_537","spm":"1001.2101.3001.4137","strategy":"pc付费专栏左侧入口","dest":"https://blog.csdn.net/qq_35620342/category_11316780.html","ab":"new"}'>
                                        <img src="https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="" onerror="this.src='https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64'">
                                        <span class="title oneline">
                                            <span class="text">面经专栏</span>
                                        </span>
                                    </a>
                                </li>
                                <li class="">
                                    <a class="clearfix" target="_blank" href="https://blog.csdn.net/qq_35620342/category_11257165.html" data-report-click='{"mod":"popu_537","spm":"1001.2101.3001.4137","strategy":"pc付费专栏左侧入口","dest":"https://blog.csdn.net/qq_35620342/category_11257165.html","ab":"new"}'>
                                        <img src="https://img-blog.csdnimg.cn/20210916171842276.png?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="" onerror="this.src='https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64'">
                                        <span class="title oneline">
                                            <span class="text">Redis</span>
                                        </span>
                                        <span class="count float-right">13篇</span>
                                    </a>
                                </li>
                                <li class="">
                                    <a class="clearfix" target="_blank" href="https://blog.csdn.net/qq_35620342/category_11292886.html" data-report-click='{"mod":"popu_537","spm":"1001.2101.3001.4137","strategy":"pc付费专栏左侧入口","dest":"https://blog.csdn.net/qq_35620342/category_11292886.html","ab":"new"}'>
                                        <img src="https://img-blog.csdnimg.cn/20210916171953893.png?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="" onerror="this.src='https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64'">
                                        <span class="title oneline">
                                            <span class="text">MySQL基础</span>
                                        </span>
                                        <span class="count float-right">5篇</span>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </div>
            </div>
        </div>
    </aside>
</div>

</div>
<div class="mask-dark"></div>
<script type="text/javascript">
    var timert = setInterval(function(){
      sideToolbar = $(".csdn-side-toolbar");
      if (sideToolbar.length > 0) {
        sideToolbar.css('cssText','bottom:64px !important;')
        clearInterval(timert);
      }
    }, 200);
</script>
<script>
    var articleId = 119947254;
    var commentscount = 99;
    var curentUrl = "https://blog.csdn.net/qq_35620342/article/details/119947254";
    var myUrl = "https://my.csdn.net/";
    var highlight = ["面试","二本","当年","22k","集合","学长","java","这份","校招","拿到"];//高亮数组
    var isRecommendModule = true;
    var isBaiduPre = true;
    var baiduCount = 2;
    var share_card_url = "https://blog.csdn.net/qq_35620342/article/shareArticleCardPage?article_id=119947254"
	var articleType = 1;
    var baiduKey = "当年学长把这份Java总结给我，让我普通二本校招拿到22K";
    var userNewReport = false;
    var needInsertBaidu = true;
    var recommendRegularDomainArr = ["blog.csdn.net/.+/article/details/","download.csdn.net/download/","edu.csdn.net/course/detail/","ask.csdn.net/questions/","bbs.csdn.net/topics/","www.csdn.net/gather_.+/"]
    var codeStyle = "atom-one-light";
    var baiduSearchType = "title";
    var canRead = true;
    var blogMoveHomeArticle = false;
    var showPcWindowAd = false;
    var showSearchText = "";
    var linkPage = true;
    var articleSource = 1;
    var articleReport = '{"pid": "blog", "spm":"1001.2101"}';
    var isShowToQuestion = false;
    var baiduSearchChannel = 'pc_relevant'
    var baiduSearchIdentification = '.no_search_link'
    var initRewardObject = {
        giver: currentUserName,
        anchor: username,
        articleId: articleId,
        sign: ''
    }
</script>
<script src="https://csdnimg.cn/public/sandalstrap/1.4/js/sandalstrap.min.js"></script>
<div class="skin-boxshadow"></div>
<div class="directory-boxshadow"></div>
<div class="pay-code">
    <div class="pay-money">实付<span class="pay-money-span" data-nowprice='' data-oldprice=''>元</span></div>
    <div class="content-blance"><a class="blance-bt" href="javascript:;">使用余额支付</a></div>
    <div class="content-code">
    <div id="payCode" data-id="">
            <div class="renovate">
                <img src="https://csdnimg.cn/release/blogv2/dist/pc/img/pay-time-out.png">
                <span>点击重新获取</span>
            </div>
        </div>
        <div class="pay-style"><span><img src="https://csdnimg.cn/release/blogv2/dist/pc/img/weixin.png"></span><span><img src="https://csdnimg.cn/release/blogv2/dist/pc/img/zhifubao.png"></span><span><img src="https://csdnimg.cn/release/blogv2/dist/pc/img/jingdong.png"></span><span class="text">扫码支付</span></div>
    </div>
    <div class="bt-close"><svg t="1567152543821" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10924" xmlns:xlink="http://www.w3.org/1999/xlink" width="12" height="12"><defs><style type="text/css"></style></defs><path d="M512 438.378667L806.506667 143.893333a52.032 52.032 0 1 1 73.6 73.621334L585.621333 512l294.485334 294.485333a52.074667 52.074667 0 0 1-73.6 73.642667L512 585.621333 217.514667 880.128a52.053333 52.053333 0 1 1-73.621334-73.642667L438.378667 512 143.893333 217.514667a52.053333 52.053333 0 1 1 73.621334-73.621334L512 438.378667z" fill="" p-id="10925"></path></svg></div>
    <!-- <p style="margin-top: 8px;font-size: 14px;" class="text-center">支付成功即可阅读</p> -->
    <div class="pay-balance">
    <input type="radio" class="pay-code-radio" data-type="details"> 
    <span class="span">钱包余额</span>
    <span class="balance" style="color:#FC5531;font-size:14px;">0</span>  
    <div class="pay-code-tile">
        <img src="https://csdnimg.cn/release/blogv2/dist/pc/img/pay-help.png" alt="">
        <div class="pay-code-content">
            <div class="span">
                <p class="title">抵扣说明：</p>
                <p> 1.余额是钱包充值的虚拟货币，按照1:1的比例进行支付金额的抵扣。<br> 2.余额无法直接购买下载，可以购买VIP、C币套餐、付费专栏及课程。</p>
            </div>
        </div>
    </div>
    </div>
    <a class="pay-balance-con" href="https://i.csdn.net/#/wallet/balance/recharge" target="_blank"><img src="https://csdnimg.cn/release/blogv2/dist/pc/img/recharge.png" alt=""><span  >余额充值</span></a>
</div>
<div style="display:none;">
	<img src="" onerror='setTimeout(function(){if(!/(csdn.net|iteye.com|baiducontent.com|googleusercontent.com|360webcache.com|sogoucdn.com|bingj.com|baidu.com)$/.test(window.location.hostname)){window.location.href="\x68\x74\x74\x70\x73\x3a\x2f\x2f\x77\x77\x77\x2e\x63\x73\x64\x6e\x2e\x6e\x65\x74"}},3000);'>
</div>
</body>
<script src="https://csdnimg.cn/release/blogv2/dist/components/js/pc_wap_highlight-db1e81323a.min.js" type="text/javascript"></script>
<script src="https://csdnimg.cn/release/blogv2/dist/components/js/pc_wap_common-6a9acd4c62.min.js" type="text/javascript"></script>
<script src="https://csdnimg.cn/release/blogv2/dist/components/js/edit_copy_code-1320dfe85c.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="https://csdnimg.cn/release/blog_editor_html/release1.6.12/ckeditor/plugins/codesnippet/lib/highlight/styles/atom-one-light.css">
<script>
 // 全局声明
 if (window.csdn === undefined) {
      window.csdn = {};
    }
    window.csdn.sideToolbar = {
        options: {
            report:{
                isShow: true,
            },
            qr: {
                isShow: false,
            },
            guide: {
                isShow: true
            }
        }
    }
    $(function(){
        $(document).on('click',"a.option-box[data-type='report']",function() {
            window.csdn.userLogin.loadAjax(function(res){
                if(userNewReport){
                    showReportNew(false,articleTitles);
                }else{
                    showReport(false,articleTitles);
                }
            })
        });
    })
</script>
    <script src="https://g.csdnimg.cn/baidu-search/1.0.9/baidu-search.js"  type="text/javascript"></script>
<script src="https://csdnimg.cn/release/download/old_static/js/qrcode.js"></script>
<script src="https://g.csdnimg.cn/lib/qrcode/1.0.0/qrcode.min.js"></script>
<script src="https://g.csdnimg.cn/user-ordercart/2.0.6/user-ordercart.js" type="text/javascript"></script>
<script src="https://g.csdnimg.cn/user-ordertip/4.1.3/user-ordertip.js" type="text/javascript" ></script>
<script src="https://csdnimg.cn/release/blogv2/dist/pc/js/common-24fa4dcb20.min.js" type="text/javascript"></script>
<script src="https://csdnimg.cn/release/blogv2/dist/pc/js/detail-44f0825236.min.js" type="text/javascript"></script>
<script src="https://csdnimg.cn/release/blogv2/dist/pc/js/column-8eca907613.min.js" type="text/javascript"></script>
<script src="https://g.csdnimg.cn/side-toolbar/3.0/side-toolbar.js" type="text/javascript"></script>
<script src="https://g.csdnimg.cn/copyright/1.0.4/copyright.js" type="text/javascript"></script>
<script>
    $(".MathJax").remove();
    if ($('div.markdown_views pre.prettyprint code.hljs').length > 0) {
        $('div.markdown_views')[0].className = 'markdown_views';
    }
</script>
<script type="text/javascript" src="https://csdnimg.cn/release/blog_mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
            "HTML-CSS": {
                    linebreaks: { automatic: true, width: "94%container" },
                    imageFont: null
            },
            tex2jax: {
                preview: "none",
                ignoreClass:"title-article"
            },
            mml2jax: {
                preview: 'none'
            }
    });
</script>
<script type="text/javascript" crossorigin src="https://g.csdnimg.cn/login-box/1.1.7/login-box.js"></script></html>
